小编PDe*_*Dev的帖子

升级到Yosemite 10.10后无法连接到postgresql数据库

更新到Yosemite 10.10后,我无法连接到我的postgresql数据库.我运行rails控制台并尝试获取第一个用户,但得到此错误...

>     ?  game_golf git:(master) ? rails c
>     Loading development environment (Rails 4.1.4)
>     [1] pry(main)> User.first
>     PG::ConnectionBad: could not connect to server: Connection refused
>       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?
>     from /Users/pauldornfeld/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `initialize'
>     [2] pry(main)>
Run Code Online (Sandbox Code Playgroud)

我该怎么办!我试图重新安装postgresql,重新安装自制程序.请帮忙!

ruby postgresql ruby-on-rails osx-yosemite

29
推荐指数
3
解决办法
5387
查看次数

标签 统计

osx-yosemite ×1

postgresql ×1

ruby ×1

ruby-on-rails ×1