我刚刚将我的 Macbook 更新为 Mountain Lion,但现在 postgresql 不起作用。当我让 Rails 服务器运行时,我收到以下错误消息:

could not connect to server: No such file or directory (PG::Error)
        Is the server running locally and accepting
        connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

-UPDATE- 现在我收到以下错误消息:
$ rails s
=> Booting Mongrel
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server


Started GET "/" for 127.0.0.1 at 2012-07-29 11:54:46 +0200

PGError (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?
):

最佳答案

您是否安装了 make、autconf、automake、binutils、bison、m4 或安装软件包以构建内核或重新安装 ruby​​: pg gem '0.14.0' on Mountain Lion fails

关于ruby-on-rails-3.2 - 在 Mountain Lion postgresql 上升级后不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/11701735/

10-10 19:06