Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
I’ve received this error on a few occasions while attempting to run Rails server or run spec suite on an old seldom touched Rails application:
/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize': could not connect to server: No such file or directory (PG::Error) Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Quick fix? A mising host setting. Add this to your config/database.yml:
development:
host: localhost
test:
host: localhost