0
我辞掉rails s
就去迅速重新启动和突然的我得到这个奇怪的错误:PG :: ConnectionBad错误
2016-11-11 18:59:59 -0500: Rack app error handling request { GET /profiles }
#<PG::ConnectionBad: could not connect to server: Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
我做了一些研究,但没有帮助我正确。
我试过在我的/usr/local/var/postgres/
文件夹中寻找一个.pid
文件,因为我建议删除一些答案,但是我的文件夹没有这个文件夹。
我什至看到有关检查我的server.log
的东西,我也没有在该文件夹中。
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
server starting
然而,这并没有解决我的问题:
最后,我碰到这个命令,这是我成功运行绊倒了。它所做的是为我创建一个server.log
文件。
该文件包含以下内容:
LOG: skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.4.
我从Heroku的在MacOS塞拉利昂运行Postgres的应用。
什么可能导致这种情况,我该如何解决?