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

时间:2012-01-10 05:10:43

标签: ruby-on-rails-3.1 osx-lion postgresql-9.1

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

为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 新'   /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:in初始化'   /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:in   block (2 levels) 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 环'   /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:260: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 连接'   /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_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:in 阻止(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 阻止(4级)'   /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/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:19:in 阻止(3级)'   /Volumes/Lion/Users/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 阻止执行'   /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:in 执行'   /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: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:in 调用'   /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in   top_level中的invoke_task' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in 阻止(2个级别)'   /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中的each' /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: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"创建数据库,   "编码" =>" unicode","数据库" =>" alpha_development"," pool" => 5,   "用户名" =>" alpha","密码" => 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 新'   /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:in初始化'   /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:in   block (2 levels) 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 环'   /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:260: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 连接'   /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_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:in 阻止(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 阻止(4级)'   /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/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:19:in 阻止(3级)'   /Volumes/Lion/Users/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 阻止执行'   /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:in 执行'   /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: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:in 调用'   /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in   top_level中的invoke_task' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in 阻止(2个级别)'   /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中的each' /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: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"创建数据库,   "编码" =>" unicode","数据库" =>" alpha_test"," pool" => 5,   "用户名" =>" alpha","密码" => 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 新'   /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:in初始化'   /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:in   block (2 levels) 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 环'   /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:260: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 连接'   /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_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:in 阻止(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 阻止(4级)'   /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/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.3/lib/active_record/railties/databases.rake:19:in 阻止(3级)'   /Volumes/Lion/Users/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 阻止执行'   /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:in 执行'   /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: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:in 调用'   /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in   top_level中的invoke_task' /Volumes/Lion/Users/atbyrd/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in 阻止(2个级别)'   /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中的each' /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: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"创建数据库,   "编码" =>" unicode","数据库" =>" alpha_production"," pool" => 5,   "用户名" =>" alpha","密码" => nil}

1 个答案:

答案 0 :(得分:2)

您的问题与Lion或SSD无关。

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

netstat -tan | grep LISTEN

默认情况下,PostgreSQL应该在5432端口上监听。