I recently updated my machine (MacBook Pro running Mountain Lion) and ever since then, whenever I set up a rails project, my machine craps out and cannot connect to PG. Curr
This is quite easy than your think because If you update your mac then process is running but postmaster.pid file is missing from /usr/local/var/postgres/ here. so you need to start process for postgres which create postmaster.pid.
If progress is running then -
Stop manually:
pg_ctl -D /usr/local/var/postgres stop -s -m fast
Start manually:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
now all are working...