Open PatGW opened 11 years ago
Sometimes, depending on how Postgres is installed and running, it may be running via a Unix socket or TCP socket; Rails tries a Unix socket by default. If it isn't there, you get the error above.
Refer to this thread: http://stackoverflow.com/questions/10263821/rails-rake-dbcreateall-fails-to-connect-to-postgresql-database
Try adding the following to your database.yml entry under the development adapter:
host: localhost
port: 5433
"Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"career_development", "pool"=>5, "username"=>"career_development", "password"=>"password", "template"=>"template0"} 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"?"
Postgres is definitely running on 5432 so not sure what the issue here is.
Any help appreciated!