0

I cloned a repository in a RoR app using postgres but I'm unable to work locally. When I run the server I get this error:

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"?

I've tried many things: the password reset doesn't work because it's not recognizing as a user...I've tried adding the underscore before postgres user...sudo su doesn't work...help!

2
  • Update: ran postgres -D /usr/local/pgsql/data and then rake db:create db:migrate after I got an error message saying the database didn't exist. The local server prompted me to run the db:create and the db:migrate, but after, I got the same error message as above. Commented Jul 31, 2014 at 13:03
  • 1
    Are you able to connect to the database outside of rails? It sounds like the database or the settings in rails aren't set up correctly so that rails can't connect to the server. I'd verify that the server is running and that you can connect to it outside or rails as a first troubleshooting step. Commented Jul 31, 2014 at 13:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.