In Gemfile
group :production do gem 'pg' end
Then run bundle install and try deploying to Heroku.
If you want to use PostgreSQL in all environments, not just production (recommended), add a gem outside the :production group and remove other database adapters such as sqlite .
As an additional note, you can also add rails_12factor gem, as suggested by Heroku.
Akshay borade
source share