在此之前,请注意,我在Stack Overflow和web上的文章中发现了几个类似的问题,但这些问题都没有帮助我解决问题:
- PG Error could not connect to server: Connection refused Is the server running on port 5432?
- PG::ConnectionBad - could not connect to server: Connection refused
- psql: could not connect to server: Connection refused
现在,问题是:
- 我有一个Rails应用程序,工作起来很有魅力.
- 与我的合作者一起,我们使用GitHub进行合作.
- 我们有
master
家和mvp
家分店. - 我最近用brew 软件(Mac)更新了我的
git
版. - 我们使用Foreman在本地启动应用程序.
现在,当我try 在本地启动应用程序时,我会出现以下错误:
PG::ConnectionBad at /
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?
我试过几次重启电脑.
我还判断了/usr/local/var/postgres
的内容:
PG_VERSION pg_dynshmem pg_multixact pg_snapshots pg_tblspc postgresql.conf
base pg_hba.conf pg_notify pg_stat pg_twophase postmaster.opts
global pg_ident.conf pg_replslot pg_stat_tmp pg_xlog server.log
pg_clog pg_logical pg_serial pg_subtrans postgresql.auto.conf
正如你所见,里面没有postmaster.pid
个文件.
知道我该怎么解决吗?