Below are the steps to access Heroku db from local development:
Login to your heroku account.
Navigate to this URL https://postgres.heroku.com/databases/ OR you can get heroku db url by running this command in the terminal:
heroku pg:credentials:url
Select your application database.
You will able to see your heroku pg credentials:
Host xxxxxxxxx.77777.amazonaws.com Database 42feddfddeee Username 44444444444 Port xxxx Password 777sfsadferwefsdferwefsdf
collect above details and put in your databse.yml file development evn:
adapter: postgresql host: < host > # HOST port: < port > # Port database: < database name > # Database Name username: < user_name > # User Name password: '< password >' # Password
Restart you application,
Best of luck..!!