I deploy Rails 5 with PostgreSQL to free app in Heroku. This is my configuration from database.yml:
database.yml
production: adapter: postgresql username
It seems like database is not provided for your app, you need to add one:
heroku addons:create heroku-postgresql
You can verify the database was added to your application by running:
heroku config --app your_app_name