Lion将rails连接到postgresql,使用ssd启动驱动器

我正试图在Lion上使用postgresql和我的rails开发 . 我的机器当前设置为从单独的高清上的固态和存储/主文件夹启动 . 我可以用post创建postgres的用户

createuser

命令

但是当我尝试使用rake创建数据库时

rake db:create

我收到这个错误

无法连接到服务器:连接被拒绝服务器是否在本地运行并接受Unix域套接字“/var/pgsql_socket/.s.PGSQL.5432”上的连接? /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1076:in initialize'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:1076:in new'/ Volumes / Lion / Users / atbyrd / . rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:1076:in connect'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby -1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:312:ininitialize'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290 /gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in new'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord- 3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:28:postgresql_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord -3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:304:in new_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1 . 3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:323:in checkout_new_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib /active_record/connection_adapters/abstract/connection_pool.rb:265:in blockout(2级)in checkout'/ Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1 . 3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:261:in loop'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib /active_record/connection_adapters/abstract/connection_pool.rb:261:in block in checkout'/Volumes/Lion/Users/atbyrd/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor . rb:201:在mon_synchronize'/ Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abst ract / connection_pool.rb:260:在结帐时'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool .rb:162:连接'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb: 409:在retrieve_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in retrieve_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in connection'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:110:in create in create_database'/ Volumes / Lion /Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:54:i n create_database'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:33:in block(5级)在'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:151:in local_database?' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:33:in block(4 levels)in' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:19:in each_value'/ Volumes / Lion /用户/ atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:19:在块中(3个级别)'/ Volumes / Lion /用户/ atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:205:in call'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:205:in block in execute'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in每个'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:200:in execute'/Volumes/Lion/Users/atbyrd/.rvm/gems/ ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:158:in block in invoke_with_call_chain'/Volumes/Lion/Users/atbyrd/.rvm/rubies/ruby-1.9.2 -p290 / lib / ruby / 1.9.1 / monitor.rb:201:in mon_synchronize'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/ lib / rake / task.rb:151:ininvoke_with_call_chain'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb :144:在调用'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:94:top_level中的块(2级)/卷/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.r b:94:每个'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in in block top_level'/ Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:88:in top_level'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:66:in block in run'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 .2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:133:in standard_exception_handling'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/ rake-0.9.2.2 / lib / rake / application.rb:63:in run'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin / rake:33:in'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in load'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / bin / rake:19:in'无法为{“适配器创建数据库“=>”postgresql“,”encoding“=>”unicode“,”database“=>”alpha_development“,”pool“=> 5,”username“=>”alpha“,”password“=> nil}无法连接到服务器:连接被拒绝服务器是否在本地运行并接受Unix域套接字“/var/pgsql_socket/.s.PGSQL.5432”上的连接? /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1076:in initialize'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:1076:in new'/ Volumes / Lion / Users / atbyrd / . rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:1076:in connect'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby -1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:312:ininitialize'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290 /gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in new'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord- 3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:28:postgresql_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord -3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:304:in new_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1 . 3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:323:in checkout_new_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib /active_record/connection_adapters/abstract/connection_pool.rb:265:in blockout(2级)in checkout'/ Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1 . 3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:261:in loop'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib /active_record/connection_adapters/abstract/connection_pool.rb:261:in block in checkout'/Volumes/Lion/Users/atbyrd/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor . rb:201:在mon_synchronize'/ Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abst ract / connection_pool.rb:260:在结帐时'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool .rb:162:连接'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in retrieve_connection'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_specification.rb:115:in retrieve_connection'/ Volumes / Lion / Users /atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in connection'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:110:in create in create_database'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:54:in create_database'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 .2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:33:在'/Volumes/Lion/Users/atbyrd/.rvm/gems/中的块(5级) ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:151:in local_database?' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:33:in block(4 levels)in' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:19:in each_value'/ Volumes / Lion /用户/ atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:19:在块中(3个级别)'/ Volumes / Lion /用户/ atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:205:in call'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:205:执行中的块'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 .2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:200:in each'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/ rake-0.9.2.2 / lib / rake / task.rb:200:执行'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib /rake/task.rb:158:在invoke_with_call_chain'/ Volumes / Lion / Users / at中的块byrd / .rvm / rubies / ruby-1.9.2-p290 / lib / ruby / 1.9.1 / monitor.rb:201:in mon_synchronize'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 . 2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:151:in invoke_with_call_chain'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake -0.9.2.2 / lib / rake / task.rb:144:在调用'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/ rake / application.rb:116:in invoke_task'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94 :在top_level中的块(2个级别)'/ Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:在每个'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in top_level'/ Volumes中/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling'/ Volumes / Lion / Users / atbyrd / .rvm /宝石/红宝石1.9.2-P290 /宝石/耙0.9.2.2 / LIB /耙/ applicati on.rb:88:top_level'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in阻止运行'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:63:in run'/ Volumes / Lion / Users / atbyrd / . rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / bin / rake:33:in'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/ bin / rake:19:in load'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in'无法为{“adapter”创建数据库= >“postgresql”,“encoding”=>“unicode”,“database”=>“alpha_test”,“pool”=> 5,“username”=>“alpha”,“password”=> nil}无法连接到server:Connection refused服务器是否在本地运行并接受Unix域套接字“/var/pgsql_socket/.s.PGSQL.5432”上的连接? /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1076:in initialize'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:1076:in new'/ Volumes / Lion / Users / atbyrd / . rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / postgresql_adapter.rb:1076:in connect'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:312:ininitialize'/ Volumes / Lion / Users /atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in new'/Volumes/Lion/Users/atbyrd/.rvm /gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in postgresql_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby- 1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:304:in new_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2 -p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:323:in checkout_new_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/ gems / activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:265:在checkout中的块(2级)'/ Volumes / L ion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:261:in loop'/ Volumes / Lion / Users /atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:261:in block in checkout'/ Volumes / Lion / Users / atbyrd / .rvm / rubies / ruby-1.9.2-p290 / lib / ruby / 1.9.1 / monitor.rb:201:in mon_synchronize'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 . 2-p290 / gems / activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:6060:in checkout'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290 /gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:162:in connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/ activerecord-3.1.3 / lib / active_record / connection_adapters / abstract / connection_pool.rb:409:in retrieve_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1 0.3 / LIB /活性_record / connection_adapters / abstract / connection_specification.rb:115:in retrieve_connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/connection_adapters /abstract/connection_specification.rb:89:in connection'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases . rake:110:在create_database中进行救援'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:54 :在create_database'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:33:in block(5在'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:151:in local_database?' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:33:in block(4 levels)in' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:19:in each_value'/ Volumes / Lion /用户/ atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / activerecord-3.1.3 / lib / active_record / railties / databases.rake:19:在块中(3个级别)'/ Volumes / Lion /用户/ atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:205:in call'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:205:执行中的块'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 .2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:200:in each'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/ rake-0.9.2.2 / lib / rake / task.rb:200:执行'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib /rake/task.rb:158:在invoke_with_call_chain'/ Volumes / Lion / Users / at中的块byrd / .rvm / rubies / ruby-1.9.2-p290 / lib / ruby / 1.9.1 / monitor.rb:201:in mon_synchronize'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9 . 2-p290 / gems / rake-0.9.2.2 / lib / rake / task.rb:151:in invoke_with_call_chain'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake -0.9.2.2 / lib / rake / task.rb:144:在调用'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/ rake / application.rb:116:in invoke_task'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94 :top_level中的块(2级)/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in每个'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:94:top in top_level'/Volumes/Lion/Users/atbyrd/.rvm/ gems / ruby-1.9.2-p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:133:in standard_exception_handling'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2 -p290 / gems / rake-0.9.2.2 / lib / rake / application.rb:88:in top_level'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake- 0.9.2.2/lib/rake/application.rb:66:in阻止运行'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib /rake/application.rb:133:in standard_exception_handling'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb: 63:在奔跑'/Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in'/ Volumes / Lion / Users / atbyrd / .rvm / gems / ruby-1.9.2-p290 / bin / rake:19:in load'/ Volumes / Lion / U sers / atbyrd / .rvm / gems / ruby-1.9.2-p290 / bin / rake:19:in'无法为{“adapter”=>“postgresql”创建数据库,“encoding”=>“unicode”, “database”=>“alpha_production”,“pool”=> 5,“username”=>“alpha”,“password”=> nil}

回答(1)

2 years ago

您的问题与Lion或SSD无关 .

请先检查你的pgsql是否正在运行 .

netstat -tan | grep LISTEN

PostgreSQL默认应该在5432端口上监听 .