Possible Duplicate:
PostgreSQL Permission denied Error on Unix domain socket “/var/pgsql_socket/.s.PGSQL.5432” - Lion Server 10.7.3 or Lion Server 10.7.4
I'm trying to teach myself Rails and would like to be able to deploy to Heroku. Heroku wants me to use PostgreSQL so I tried to install it using homebrew.
Now when I try and interact with the database it tells me:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
That led me to this question/answer. I tried to follow wolftron's solution, but when I get to the final step:
then use the pg_ctl binary in /usr/local/bin to start the right postgres server successfully (which is where $PATH comes in – make sure which pg_ctl resolves to /usr/local/bin/pg_ctl, or just always call it explicitly).
I run into another fun issue:
localhost: which pg_ctl
pg_ctl not found
So now I try and track down pg_ctl:
sudo find / -name pg_ctl
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/usr/local/bin/archive/pg_ctl
So pg_ctl is in /usr/local/bin/archive/? Why is it there? Did I botch the homebrew install? At this point I started to try and think about how to move it to /usr/local/bin, but its starting to feel like I'm going down a rabbit hole.
Any ideas how to fix this? I am close to just wiping OSX and doing a fresh install, but I'm afraid I'll just get the same issues again...