Heroku and Rails: Gem Load Error with Postgres, however it is Specified in GEMFILE
I had this exact issue and resolved it by changing to:
'pg', '~> 0.20'
Should also be fixed by upgrading rails >= 5.1.5
https://github.com/rails/rails/issues/31673