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 using postgres as my backend database for Rails, but it has stopped working due to a misconfiguration problem, but I cannot see what it is.
My version of postgres is 9.1.4, and is installed in /usr/bin
I'm running ruby version 1.9.3, but I have to switch to it manually in rvm, since the default 1.8.7 is what comes up.
I'm running Rails 3.2.8
My config file pg_hba.conf looks like:
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
Most lines in postgres.conf file are commented out, save for a few innocuous lines like:
log_destination = 'stderr'
listen_addresses = '*'
port = 5432
max_connections = 100
I also installed the 'Postgres App' for Mac (see postgresapp.com/documentation), which it says is running and listening on port 5432.
When I run ps -ax | grep post I see:
1088 ?? 0:00.08 com.heroku.postgres-service
1135 ?? 0:00.29 /Applications/Postgres.app/Contents/MacOS/bin/postgres -D /Users/rickc/Library/Application Support/Postgres/var -p5432
1137 ?? 0:01.14 postgres: writer process
1138 ?? 0:00.78 postgres: wal writer process
1139 ?? 0:00.20 postgres: autovacuum launcher process
1140 ?? 0:00.26 postgres: stats collector process
But when I try to start rails connect at localhost:3000, I get this error message: PG::Error
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"?
I've tried to examine the previous posts here, and the postgres documentation of course, cannot quite see what's misconfigured here; any help much appreciated...