Running into the a similar issue as that mentioned here
Postgres could not connect to server
I am trying to run rake db:create on a rails 4.1.4 project. I have tried everything mentioned in the previous post - any other suggestions are welcome.
Furthermore, after reinstalling postgres, I ran the command
brew info postgresql
and got this Conflicts with: postgres-xc
(though I'm not sure if this is relevant). I'm running postgres 9.3.4
Any help will be greatly appreciated...
Thanks!
Update: This is the exact error:
could not connect to server: Socket operation on non-socket
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Things I've tried so far:
brew uninstall postgresql
brew update
brew upgrade
brew install postgresql
followed by the list of commands here http://www.postgresql.org/docs/9.3/static/server-start.html
Finally, using the lunchy gem to start postgres worked - http://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/