迁移到 Ruby 2.2.0/Rails 4.2 后 Buildpack 失败
Buildpack fails after migrating to Ruby 2.2.0/Rails 4.2
我在 Heroku 上使用自定义构建包已经有一段时间了,并且一直在使用 BUILDPACK_URL env 变量在推送期间启动它。
最近硬着头皮从Ruby1.9.3/Rails3.2.14升级到Ruby2.2.0/Rails4.2.1.rc1 - 在我的开发机器上一切正常,但是我现在无法推送到 Heroku,并且出现以下错误:
~/documents/coding/test$ heroku fork -a vfacelift vupgrade
~/documents/coding/test$ heroku config:unset BUILDPACK_URL -a vupgrade
~/documents/coding/test$ heroku buildpack:set https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git -a vupgrade
~/documents/coding/test$ git push vupgrade vupgrade:master
Fetching repository, done.
Counting objects: 9723, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4943/4943), done.
Writing objects: 100% (9723/9723), 82.88 MiB | 758.00 KiB/s, done.
Total 9723 (delta 6948), reused 6422 (delta 4535)
-----> Fetching custom git buildpack... done
-----> Ruby app detected
-----> Compiling Ruby/Rails
!
! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.2.0.tgz -s -o - | tar zxf -' failed unexpectedly:
!
! gzip: stdin: unexpected end of file
! tar: Child returned status 1
! tar: Exiting with failure status due to previous errors
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:vupgrade.git
! [remote rejected] upgrade -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:vupgrade.git'
根据其他 SO 答案,我首先从分叉版本中取消设置 BUILDPACK_URL env 变量并使用 heroku buildpack:set
CLI 命令。我还尝试将 STACK env 变量设置为 cedar-14 但这似乎没有什么不同。
由于 buildpack 已经运行了一段时间并更新为 Rails 4,我怀疑问题出在那里。
我还尝试使用 https://github.com/ddollar/heroku-buildpack-multi.git 构建包并将 .buildpacks 文件包含在以下内容中:
https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git
https://github.com/heroku/heroku-buildpack-ruby.git
然后我尝试从 .buildpacks 文件中删除 buildpack-ruby,因为我注意到 Heroku 通过 Gemfile 将应用程序检测为 Ruby。这两个都像以前一样失败了。
非常感谢任何帮助...
谢谢,
罗伯特
我之前在 Stack Overflow 上看到过这个错误:
git push github master
To git@github.com:Joey-project/project.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:Joey-project/project.git'
我认为发生这种情况的主要原因之一是因为有人试图将一个分支推送到同时已更新的远程分支。
一个通用的解决方案是使用以下命令的变体:
git fetch github; git merge github/master
我注意到 heroku: Gemfile.lock is required issue 可以提供解决问题的思路。
希望对您有所帮助!
似乎在 AWS 上 heroku 存储其构建包的目录结构发生了变化。请参阅 https://github.com/heroku/heroku-buildpack-ruby/issues/304 for more info. I forked the https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git buildpack,将 STACK 添加到 ruby URL,允许 buildpack 用户将其设置为 cedar 或 cedar-14 等,然后在 master 上创建拉取请求。
希望这对以后的人有所帮助。
罗伯特
我在 Heroku 上使用自定义构建包已经有一段时间了,并且一直在使用 BUILDPACK_URL env 变量在推送期间启动它。
最近硬着头皮从Ruby1.9.3/Rails3.2.14升级到Ruby2.2.0/Rails4.2.1.rc1 - 在我的开发机器上一切正常,但是我现在无法推送到 Heroku,并且出现以下错误:
~/documents/coding/test$ heroku fork -a vfacelift vupgrade
~/documents/coding/test$ heroku config:unset BUILDPACK_URL -a vupgrade
~/documents/coding/test$ heroku buildpack:set https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git -a vupgrade
~/documents/coding/test$ git push vupgrade vupgrade:master
Fetching repository, done.
Counting objects: 9723, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4943/4943), done.
Writing objects: 100% (9723/9723), 82.88 MiB | 758.00 KiB/s, done.
Total 9723 (delta 6948), reused 6422 (delta 4535)
-----> Fetching custom git buildpack... done
-----> Ruby app detected
-----> Compiling Ruby/Rails
!
! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.2.0.tgz -s -o - | tar zxf -' failed unexpectedly:
!
! gzip: stdin: unexpected end of file
! tar: Child returned status 1
! tar: Exiting with failure status due to previous errors
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:vupgrade.git
! [remote rejected] upgrade -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:vupgrade.git'
根据其他 SO 答案,我首先从分叉版本中取消设置 BUILDPACK_URL env 变量并使用 heroku buildpack:set
CLI 命令。我还尝试将 STACK env 变量设置为 cedar-14 但这似乎没有什么不同。
由于 buildpack 已经运行了一段时间并更新为 Rails 4,我怀疑问题出在那里。
我还尝试使用 https://github.com/ddollar/heroku-buildpack-multi.git 构建包并将 .buildpacks 文件包含在以下内容中:
https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git
https://github.com/heroku/heroku-buildpack-ruby.git
然后我尝试从 .buildpacks 文件中删除 buildpack-ruby,因为我注意到 Heroku 通过 Gemfile 将应用程序检测为 Ruby。这两个都像以前一样失败了。
非常感谢任何帮助...
谢谢, 罗伯特
我之前在 Stack Overflow 上看到过这个错误:
git push github master
To git@github.com:Joey-project/project.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:Joey-project/project.git'
我认为发生这种情况的主要原因之一是因为有人试图将一个分支推送到同时已更新的远程分支。
一个通用的解决方案是使用以下命令的变体:
git fetch github; git merge github/master
我注意到 heroku: Gemfile.lock is required issue 可以提供解决问题的思路。
希望对您有所帮助!
似乎在 AWS 上 heroku 存储其构建包的目录结构发生了变化。请参阅 https://github.com/heroku/heroku-buildpack-ruby/issues/304 for more info. I forked the https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git buildpack,将 STACK 添加到 ruby URL,允许 buildpack 用户将其设置为 cedar 或 cedar-14 等,然后在 master 上创建拉取请求。
希望这对以后的人有所帮助。
罗伯特