Trying to setup postgres on OSX

Viewed 8143

I am trying to get postgres setup locally for a rails app on my mac (10.7 Lion).

I installed postgresapp and launched it, I now have an elephant in my status bar telling me that postgres is running.

I can get to it by:

psql -h localhost

But when I simply run psql I get this error:

psql: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

I put this:

PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"

In ~/.bashrc and opened a new terminal. But no dice.

When I run which psql I get /usr/bin/psql

Not really sure what to do.. I am still pretty new to unix systems. Should I symlink /usr/bin/psql to /Applications/Postgres.app/Contents/MacOS/bin/psql?

2 Answers
Related