簡體   English   中英

Heroku:由於gem install bundler而無法推送到Heroku

[英]Heroku: Cannot push to Heroku due to gem install bundler

突然之間,我無法推送到Heroku上,並且構建成功,但是在編譯時,我看到以下內容:

remote: -----> Build succeeded!
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: sh: 1: gem-install-bundler: not found
remote: sh: 1: gem-install-bundler: not found
remote:  !
remote:  !     An error occurred while installing ruby-2.2.3-The-latest-bundler-is-1.15.2,-but-you-are-currently-running-1.15.1.-To-update,-run-`gem-install-bundler`
remote:  !     
remote:  !     Heroku recommends you use the latest supported Ruby version listed here:
remote:  !     https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote:  !     
remote:  !     For more information on syntax for declaring a Ruby version see:
remote:  !     https://devcenter.heroku.com/articles/ruby-versions
remote:  !     
remote:  !     
remote:  !     Debug InformationCommand: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.2.3-The-latest-bundler-is-1.15.2,-but-you-are-currently-running-1.15.1.-To-update,-run-`gem-install-bundler`.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote:  !     bash: gem-install-bundler: command not found
remote:  !     
remote:  !     gzip: stdin: unexpected end of file
remote:  !     tar: Child returned status 1
remote:  !     tar: Error is not recoverable: exiting now
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed

據我所知,我認為我需要更新捆綁軟件,因此我將捆綁軟件更新為1.15.2版,並嘗試再次將其推上去,但是顯示了相同的錯誤。 我的gemfile.lock甚至說BUNDLED WITH 1.15.2

我有什么想念的嗎?

我聯系了Heroku,他們向我展示了我有多個buildpack:

感謝您就安裝紅寶石方面的問題與我們聯系。 似乎該應用程序為Ruby指定了兩次Heroku Buildpack,而后者指定了主版本,而不是發行版本:

$ heroku buildpacks -a app-name
=== app-name Buildpack URLs
1. heroku/ruby
2. https://github.com/heroku/heroku-buildpack-nodejs.git
3. https://github.com/heroku/heroku-buildpack-ruby.git

然后,他們繼續向我展示如何解決該問題:

您能否嘗試一次指定每個buildpack以及使用發布的版本來查看問題是否持久?

$ heroku buildpacks:remove -i 3 -a app-name
$ heroku buildpacks:remove -i 2 -a app-name
$ heroku buildpacks:remove -i 1 -a app-name
$ heroku buildpacks:add heroku/nodejs -a app-name
$ heroku buildpacks:add heroku/ruby -a app-name
$ git push heroku master

這解決了一切!

您是否將生成的Gemfile.lock檢查到版本控制中

git add Gemfile.lock

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM