I quit my rails s
and went to restart it quickly and all of a sudden I am getting this weird error:
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"?
>
I did some research but nothing helps me properly.
I tried looking for a .pid
file in my /usr/local/var/postgres/
folder, because some answers suggested I deleted, but my folder doesn't have that.
I even saw something about checking my server.log
and I didn't have that in that folder either.
Eventually I stumbled across this command, which I ran successfully:
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
server starting
However, that doesn't solve my issue. What it does do though is create a server.log
file for me.
That file has the following contents:
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.
I am running the Postgres App from Heroku on macOS Sierra.
What could be causing this and how do I fix it?
Not sure that this is a fix, but I restarted my machine and everything works like normal.
If someone has a more complete answer, that would be good.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments