这是我的错误。
PG::Error - 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?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
TCP/IP connections on port 5432?
我使用自制软件将 postgresql 安装到 /usr/local/bin/psql 为了让它识别这个版本,我必须将它添加到我的 bash 文件中。
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
当我 cd 进入我的 rails 应用程序并运行命令时
rails s
它从以下内容开始
=> Booting Thin
=> Rails 4.0.0.beta1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
然后,当我尝试查看应用程序时,http://0.0.0.0:3000
我收到上述错误,任何人都可能知道为什么会发生这种情况。