I am a Rails beginner and i see some issue while deploying to Heroku.
Earlier i used SQLite3, later when i understood that i needed postgresql i installed the same a
If you have recently deployed your app to Heroku and in your attempt have been getting the "App crashed" error when you go to the Heroku app link, but everything else seems to be in order, it's most likely due to a new release of the 'pg' gem
. Postgres has released a new version of its gem which seems not fully compatible yet, so in your Gemfile under group production
change the line:
gem 'pg'
OR
gem 'pg', '~> 1.0.0'
to
gem 'pg', '~> 0.11'
OR
gem 'pg', '~> 0.20.0'
Note: the tilde sign before the >
, that's not a dash
Once you make this update in your group production of your Gemfile, ensure you run bundle install --without production
(to update Gemfile.lock file), do a git add/commit cycle, then re-deploy to Heroku.
For Good Practice
Use pg gem
one time without :group
because your database is same for both development
& production!