Heroku push rejected, failed to install gems via Bundler

后端 未结 7 2071
心在旅途
心在旅途 2020-12-24 05:27

I am struggling to push my code to Heroku. And after searching on Google and Stack Overflow questions, I have not been able to find the solution. Here is What I get when I t

相关标签:
7条回答
  • 2020-12-24 05:47

    I solved this issue this way:

    1. bundle update
    2. git add Gemfile.lock
    3. git commit -m 'Update Gemfile.lock for Heroku'
    4. git push heroku master
    0 讨论(0)
  • 2020-12-24 05:48
    1. bundle update
    2. git add Gemfile.lock
    3. git commit -m 'Update Gemfile.lock for Heroku'
    4. git push heroku master

    it worked for me.

    0 讨论(0)
  • 2020-12-24 05:55

    I'm pretty sure Heroku only supports certain versions of Rails, so you need to be on at least 3.0, instead of a release candidate. Update the version of Rails in your gemfile, run bundle update, and then try to push to Heroku.

    0 讨论(0)
  • 2020-12-24 05:59

    I don't think it's a Rails version problem, nor is it specific to Heroku. (I hit the same problem today, when running bundle install on my local development machine, with Rails 3.0.3.)

    Running bundle update locally, as Andrew suggested, fixes the issue.

    Edit: As suggested in the comments: remember to git add ., git commit -m "message"

    0 讨论(0)
  • 2020-12-24 06:02

    I actually solved it by simply pushing it up a second time after letting things sit for a few minutes... I have re-spun my dokku system from scratch and encountered the same issue, on the same day after I had previously attempted a workaround of updating nokogiri. That was when I realized, this seems to be an oddity of herokuish; it doesn't always take on the first push.

    I wonder if behind the scenes it's installing library headers, and when they take too long, bundler simply fails the install.

    0 讨论(0)
  • 2020-12-24 06:11

    Use:

    rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock
    

    I had Gemfile.lock at my localserver make sure to delete it from the localserver AND also the HEROKU V-machine.

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