Reputation: 557
When i run rake db:migrate i get this error:
rake aborted! 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"?
Any suggestions?
This is my database.yml file:
Upvotes: 1
Views: 791
Reputation: 9693
The problem is that your rails application is trying to connect to the database, by using the configuration that you have on config/database.yml
It seems that you have configured a connection to a PostgreSQL but that the rails application cannot connect so it throws that error.
Check that you have the right credentials on config/database.yml and make sure postgresql is running.
Upvotes: 1
Reputation: 23344
Whenever you get the error like this check if something went wrong as:
Probably the host is not added.
Adding host to database.yml file -
development:
adapter: postgresql
encoding: utf8
database: myapp_development
username: myuser
host: localhost
test:
adapter: postgresql
encoding: utf8
database: myapp_test
username: myuser
host: localhost
production:
adapter: postgresql
encoding: utf8
database: myapp_production
Upvotes: 0