Heroku:由于gem install bundler,无法推送到Heroku

时间:2017-07-17 19:20:37

标签: ruby-on-rails git heroku 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

从我可以收集到的内容中,我认为我需要更新bundler,因此我将bundler更新到版本1.15.2,并尝试再次将其推送,但显示相同的错误。我的gemfile.lock甚至说BUNDLED WITH 1.15.2

我有什么遗失的吗?

2 个答案:

答案 0 :(得分:1)

我联系了Heroku,他们告诉我我有多个buildpack:

  

感谢您就安装红宝石的问题与我们联系。   看来这个应用程序有两次指定的Heroku Buildpack for Ruby,   后者指定主版本而不是发布版本   版本:

{{ variable }}

然后他们继续告诉我如何解决这个问题:

  

你可以尝试一次指定每个buildpacks   使用已发布的版本来查看问题是否存在?

$ 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

这解决了一切!

答案 1 :(得分:0)

您是否将生成的Gemfile.lock检入版本控制

git add Gemfile.lock