I have been following Heroku's guide to getting started with Ruby on Heroku, and have gotten stuck trying to connect to the postgres database.
When I run:
bundle exec rake db:create db:migrate
I am left with this error:
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
And:
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "database"=>"garrett", "username"=>"ruby-getting-started"}
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I have tried editing my database.yml file but I'm not sure if I am changing the correct parameters:
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5
development:
<<: *default
database: ruby-getting-started_development
username: ruby-getting-started
test:
<<: *default
database: ruby-getting-started_test
production:
<<: *default
database: ruby-getting-started_production
username: ruby-getting-started
password: <%= ENV['RUBY-GETTING-STARTED_DATABASE_PASSWORD'] %>
Do I have my database.yml setup incorrectly or am I completely wrong?