当前位置:Gxlcms > 数据库问题 > rails项目使用postgresql数据库启动时报错

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

时间:2021-07-01 10:21:17 帮助过:5人阅读

技术分享


[***@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数据库启动时报错

标签:

人气教程排行