URGENT: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Failed to initialize site default
And then opening localhost:3000 I see:
PG::ConnectionBad at /
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432”?
The problem is new and I have run my local Discourse fine before.
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
So I’ve deleted my local copy discourse and started from scratch and cloned Discourse. When I bundle exec rake db:create db:migrate db:test:prepare I get the error I was getting before:
URGENT: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Failed to initialize site default
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
@stevenpslade, you need to ensure the postgresql server is running locally. Depending on how you installed it (brew install, http://postgresapp.com/ or anything else) the solution might be different. We need more info about your setup.
I just run into similar issue. For info of others coming here - in my case the postgresql deamon was stopped, but there was a PID file postmaster.pid from previous startup. I fixed this by simpy removing old PID file: rm /usr/local/var/postgres/postmaster.pid. Location of this file is system specific, so please double-check.