Heroku rejecting push in mature application (pre-receive hook declined)

后端 未结 5 1055
时光取名叫无心
时光取名叫无心 2021-02-06 12:58

I\'m getting

   FAILED: http://devcenter.heroku.com/articles/bundler

! Heroku push rejected, failed to install gems via Bundler To git@hero

相关标签:
5条回答
  • 2021-02-06 13:41

    I was getting the same error, and running the following code in the command line solved it:

    $ heroku config:set BUNDLE_WITHOUT="development:test"


    I think the gemfile.lock issues described above are red herrings.

    0 讨论(0)
  • 2021-02-06 13:46
    You have modified your Gemfile in development but did not check
    the resulting snapshot (Gemfile.lock) into version control
    

    This means that you have added gems to you gemfile but have not updated to. The Gemfile.lock is out of sync with this file.

    You need to update your bundle.

    Run this command in console in your app's directory: bundle

    Then do git push heroku

    And you should be good to go.

    **Nuke the app and start over.

    gem install taps #install taps
    heroku db:pull   #pull your data to your local machine
    
    rm -rf .git #remove your git repo 
    git init    #create a new repo
    git add .   #add all the files
    git commit -m 'master' #commit as master
    
    heroku create #create a new heroku app
    heroku rename myapp #rename the app
    git push heroku master #push to heroku
    
    heroku db:push #push your data to heroku
    

    And that should get a new app up.

    0 讨论(0)
  • 2021-02-06 13:46

    From what I have read, this is a windows issue.

    Why won't Heroku accept my Gemfile.lock in Windows?

    I've spent hours trying to figure this out and no dice. Time to move to a virtual machine and try there. Bummer.

    0 讨论(0)
  • 2021-02-06 13:49

    Or, it could be that Heroku is having API issues and is down. Check https://status.heroku.com/

    This happened to me today with a mature app.

    0 讨论(0)
  • 2021-02-06 13:51

    I've just had the same problem, and the following fixed it for me:

    I had a combination of gems grouped by requirement (test, development etc), and some that were used by both e.g.

    group :development do
      gem "hpricot"
      gem "ruby_parser"
      gem "haml-rails", ">= 0.3.4"
    end
    

    and

    gem "rspec-rails", ">= 2.9.0.rc2", :group => [:development, :test]
    

    I deleted the single line ones, and just duplicated them in the relevant blocks (not DRY I know, but what the heck).

    Did a quick Bundle, and hey presto I could push to Heroku again...

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