I am following this guide to set up a rails project with Postgres.
So far I have installed postgress and the Heroku toolbelt and done the following:
- Logged in using my heroku credentials
- Created a rails project using postgres
rails new myapp --database=postgresq
The default database.yml file looks like this:
default: &default adapter: postgresql encoding: unicode pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> development: <<: *default database: myapp_development test: <<: *default database: myapp_test production: <<: *default database: myapp_production username: myapp password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %>
created controller for homepage
rails g controller welcome
Created index.html.erb and added routing.
root 'welcome#index'
Then When I run the server, go to localhost:3000 and get the following error
PG::ConnectionBad (fe_sendauth: no password supplied
):
Is the issue with the database.yml file or with the installation and setup of postgres?