Heroku is trying to install sqlite3 gem even it not being in the Gemfile

前端 未结 4 1625
悲哀的现实
悲哀的现实 2021-02-04 04:44

I\'m trying to deploy a Rails 3.1 application for the first time on Heroku. I set it to the Cedar stack, removed the sqlite3 gem but when I push the code to Heroku I get this er

相关标签:
4条回答
  • 2021-02-04 05:12

    When I ran into the problem, turns out I'd forgotten to commit my changes after bundle install. Doh! git status should indicate unstaged changes for the gem files.

    0 讨论(0)
  • 2021-02-04 05:12

    I has the same problem and zoltarSpeaks' solution fixed it for me. I had the taps gem installed after reading this article that indicated it would be necessary for pushing from a local sqlite3 to production postgresql: http://batsov.com/articles/2011/10/30/deploying-rails31-apps-on-celadon-cedar/. Turned out I didn't need the taps gem after all, but it was clearly the problem. Removed the reference, bundle update, all systems go.

    0 讨论(0)
  • 2021-02-04 05:27

    Simple solution without uninstalling sqlite3 gem for Heroku:

    Add to Gemfile:

    group :production do
    gem 'pg', '0.17.1' #or version of pg you want
    gem 'rails_12factor', '0.0.2' #Heroku static assets for image and css
    

    Check, that you have:

    end 
    end
    

    at the end of code in Gemfile

    than Save Gemfile and run bundle install

    $ bundle install --without production
    

    than commit

    $ git commit -a -m "Update Gemfile.lock for Heroku"
    

    than

    $ git push heroku master
    

    That is all. You will get only a few warnings which is simply to fix.

    0 讨论(0)
  • 2021-02-04 05:28

    try deleting Gemfile.lock and run Bundle Install, commit and push

    0 讨论(0)
提交回复
热议问题