2015-03-18 74 views
0

我一直在Heroku上使用自定义buildpack一段时间,并且在推送过程中一直使用BUILDPACK_URL env变量来启动它。Buildpack在迁移到Ruby 2.2.0/Rails 4.2后失败

最近我点了一下子,从Ruby 1.9.3/Rails 3.2.14升级到Ruby 2.2.0/Rails 4.2.1.rc1 - 在我的开发机器上一切正常,但是我无法推到Heroku现在,和我得到以下错误:基于其他SO答案

~/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 [email protected]:vupgrade.git 
! [remote rejected] upgrade -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:vupgrade.git' 

,我第一次没有设置从分叉版本BUILDPACK_URL环境变量和使用的heroku buildpack:set CLI命令。我也尝试将STACK env变量设置为Cedar-14,但这似乎没有什么区别。

由于buildpack在一段时间内工作良好,并针对Rails 4进行了更新,因此我怀疑问题在于此。

我也使用https://github.com/ddollar/heroku-buildpack-multi.git buildpack尝试和包括在与.buildpacks以下文件:

https://github.com/tomwolfe/heroku-buildpack-gsl-ruby.git 
https://github.com/heroku/heroku-buildpack-ruby.git 

然后我试图从.buildpacks文件除去buildpack-红宝石作为我注意到的Heroku被检测该应用作为Ruby通过Gemfile。这两个都像以前一样失败。

任何帮助深表感谢......

感谢, 罗伯特

回答

0

我见过这个错误的堆栈溢出:

git push github master 
To [email protected]:Joey-project/project.git 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to '[email protected]:Joey-project/project.git' 

相信的主要原因之一发生这种情况是因为有人试图将分支推送到同时更新的远程分支。

的一般解决方法是使用下面的命令的变化:

git fetch github; git merge github/master 

我注意到heroku: Gemfile.lock is required issue可能就如何解决这个问题的想法。

我希望它有帮助!

+0

Thanks @Joey。推送的分支有分叉的服务器更新合并,所以我是最新的(只需双重检查确保)。我做了一个捆绑安装只是为了看到,但Gemlock文件没有改变,所以我也是最新的...... – 2015-03-18 23:45:01