码迷,mamicode.com
首页 > 数据库 > 详细

rails项目使用postgresql数据库启动时报错

时间:2015-08-12 21:56:29      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:

问题描述:

技术分享


[***@localhost  *****]$ rails s

=> Booting WEBrick

=> Rails 3.2.19 application starting in development on http://0.0.0.0:3000

=> Call with -d to detach

=> Ctrl-C to shutdown server

Exiting

/usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize‘: could not connect to server: Connection refused (PG::ConnectionBad)

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?

解决方法:sudo service postgresql start

rails项目使用postgresql数据库启动时报错

标签:

原文地址:http://my.oschina.net/mayxu/blog/491555

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!