I have a local version of my app working well, but I'm trying to push the data to my live app. I'm running rails db:migrate RAILS_ENV=production
and I get the PG::ConnectionBad: FATAL: role "***" does not exist
message.
I'm taking 'username' 'database' and 'password' in my .yml file as the details given under the Database Credentials for my heroku postgres addon
My .yml file:
default: &default
adapter: postgresql
pool: 5
timeout: 5000
development:
adapter: postgresql
database: postgresql-rectangular-42683
pool: 5
timeout: 5000
test:
adapter: postgresql
database: postgresql-rectangular-42683
pool: 5
timeout: 5000
production:
adapter: postgresql
encoding: utf8
database: ***
pool: 5
username: ***
password: *********
#host: ***.***.***.*** #-> only for third party db server