Error message - detected sqlite3 gem which is not supported on Heroku



I am on Step 3.7 of the “Your First Rails Application” Project (part of Web Development 101). All other steps have been successful up to this point (or so I thought.) Step 3.7 involves pushing the files to Heroku after committing them to github. After typing in the command:

git push heroku master

I receive an output that ends in messaging stating that the push to Heroku was rejected. These outputs are highlighted in red:

remote: ! Failed to install gems via Bundler.
remote: ! Detected sqlite3 gem which is not supported on Heroku:
remote: !

After researching information in the website provided, it appears that SQL is not well supported, and it is suggested to install Postgres instead. I’d like to follow the tutorial exactly since I’m new. Is there a way to bypass this error?

Thank you!


OP here -

I saw this problem quite a bit while searching the forums. I’m not sure how I fixed it, but it worked after I redid the changes to the gemfile in VS Code.


sqlite3 and postgres are both database gems. sqlite3 deletes all data every 24-hours, as I understand. You can install postgres by replacing gem 'sqlite3' with gem 'pg' and then running bundle install.