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的應用。
什麼可能導致這種情況,我該如何解決?