0

I've searched everywhere for an answer to this questions, but none of the solutions seem to account for the difficulty I'm having.

Currently, I have Sqlite in my :development, test do and Postgres in my :production, as shown below

 group :development, :test do
     gem 'sqlite3', '1.3.12'
     gem 'byebug',  '9.0.0', platform: :mri
 end

 group :production do
    gem 'pg', '0.18.4'
 end 

However, when attempting to Deploy to Heroku, I still keep getting the error:

 remote:        An error occurred while installing sqlite3 (1.3.12), 
 and Bundler cannot
 remote:        continue.
 remote:        Make sure that `gem install sqlite3 -v '1.3.12'` succeeds 
 before bundling.

I've tried migrating the database, uninstalling and reinstalling the gemfile, and changing the config file to contain postgres SQL in production, but I still can't deploy the Ap without this error. I'd really appreciate any help anyone could offer! Thank you.

Dog
  • 2,726
  • 7
  • 29
  • 66
  • Have you tried creating another app in heroku using `heroku create` and then `git push heroku your_branch` ? Do you have `gem 'rails_12factor', group: :production` ? – dp7 Dec 06 '16 at 08:28
  • 3
    sqlite is a disk based database system, so it is not supported on heroku. change sqlite to pg for both dev and test environments. – marmeladze Dec 06 '16 at 08:33
  • It's also recommended to use same database management system for all environments. – lightalloy Dec 06 '16 at 08:56
  • it was my understanding though that if sqlite was in the group :development, :test do Gemfile group then Heroku would only read the :production db, which was set to Postgres. that's essentially what they claim here: http://stackoverflow.com/questions/3897431/deploying-ror-app-to-heroku-with-sqlite3-fails?rq=1 – Dog Dec 06 '16 at 09:25
  • can you show database.yml ? – Milind Dec 07 '16 at 00:02

0 Answers0