错误:启动POSTGRESQL服务器
问题描述:
我对ruby和postgresql非常陌生。
当我尝试运行错误:启动POSTGRESQL服务器
ruby scrpit/server, rake db:migrate, rake db:seed
我得到这个。
Rails 2.3.11 application starting on http:/0.0.0.0:3000
warning: already initialized constant SESSION_SECRET
Faraday: you may want to install system_timer for reliable timeouts
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/activerecord-.3.11/lib/active_record/connection_adapters/postgresql_adapter.rb:941:in `initialize': could not connect to server: Connection refused (PGError)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
我在Ubuntu 12.04,红宝石1.8.7,轨-2.3,宝石1.5.3
答
这是你应该做的:
验证Postgres的服务器实际运行
$ netstat -a | grep postgre
如果它正在运行,请尝试使用psql
命令从终端连接到它。加入它,不运行。尝试手动
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
如果仍然无法启动, 是否有在server.log任何错误消息开始呢?如果是,请在这里发布。
祝你好运!
感谢您的答复。我尝试了这两个,但都没有工作。这里是错误消息。'http://pastebin.com/jwVB3NaS – user2295369 2013-04-27 21:32:20
- 错误:以下软件包有未满足的依赖关系: postgres-xc:取决于:postgres-xc-client但它不会被安装 E:无法纠正问题,你已经打破了软件包。 – user2295369 2013-04-29 09:45:46