Detected sqlite3 gem which is not supported on Heroku

后端 未结 4 967
一生所求
一生所求 2020-12-15 23:24

I\'m trying to push my rails app to Heroku, and I keep getting the following error:

       An error occurred while installing sqlite3 (1.3.8), and Bundler ca         


        
相关标签:
4条回答
  • 2020-12-16 00:00

    Try using this for production

    group :production do
      gem 'pg', '0.15.1'
      gem 'rails_12factor'
    end
    

    Additional information can be found here: https://devcenter.heroku.com/articles/sqlite3

    0 讨论(0)
  • 2020-12-16 00:12

    I have modified the gem file to use sqlite only on development, and test.

    But, my mistake was: I have forgotten to commit the changes on git.

    0 讨论(0)
  • 2020-12-16 00:14

    You have a typo:

    group :development, :test do # <<<< :development, not devlopment
      gem 'sqlite3'
    end
    

    As heroku ignores development specific gems, when running the bundle it includes sqlite3 gem.

    0 讨论(0)
  • 2020-12-16 00:18

    Try this

    heroku rake db:reset
    heroku rake db:migrate
    
    0 讨论(0)
提交回复
热议问题