0

我刚刚安装了 postgresql,因为我想把我的应用程序放到 heroku 上。尝试使用 pq 设置新的 rails 应用程序时,一旦我 rake db:create 并收到以下错误消息,我不知道这意味着什么,也不知道该怎么做。

这是我收到的错误消息。

new-host-2:scheduleScraper rickmasta$ rake db:create:all
could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `connect'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:144:in `rescue in create_database'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:85:in `create_database'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:184:in `local_database?'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `each_value'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in `load'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in `<main>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"scheduleScraper_development", "pool"=>5, "username"=>"scheduleScraper", "password"=>nil}
could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `connect'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:144:in `rescue in create_database'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:85:in `create_database'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:184:in `local_database?'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `each_value'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in `load'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in `<main>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"scheduleScraper_test", "pool"=>5, "username"=>"scheduleScraper", "password"=>nil}
could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `connect'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:144:in `rescue in create_database'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:85:in `create_database'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:52:in `block (5 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:184:in `local_database?'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:52:in `block (4 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `each_value'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railties/databases.rake:38:in `block (3 levels) in <top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/Users/rickmasta/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in `load'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in `<main>'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/rickmasta/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"scheduleScraper_production", "pool"=>5, "username"=>"scheduleScraper", "password"=>nil}
4

2 回答 2

1

这是在 Mountain Lion 上使用 brew 安装 PostgreSQL 时的一个已知问题。Postgres 将套接字文件放在不同的目录中/var/pgsql_socket_alt,然后 psql、createdb、Rails 等知道在哪里寻找它。您需要通过 postgres.conf 文件更改套接字文件的位置。请参阅此链接以了解如何修复它。

于 2013-04-01T19:44:48.703 回答
0

您可能已经安装了 postgres,但它正在运行吗?

重新启动机器后,我遇到了几乎相同的错误,因为我不记得在本地(重新)启动 postgres 应用程序。在我再次启动 PostGres 应用程序后,一切正常。

这些是我的错误:

    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (fe80::1) and accepting
    TCP/IP connections on port 5432?
    from /Users/gregorysmith/.rvm/gems/ruby-1.9.3-p429/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new'
etc, etc. ........
于 2013-06-14T01:28:39.617 回答