我正在尝试将 Rails 应用程序推送到 Heroku,但是我不断收到此错误。
user$ git push heroku master
Initializing repository, done.
Counting objects: 158, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (144/144), done.
Writing objects: 100% (158/158), 671.52 KiB | 160.00 KiB/s, done.
Total 158 (delta 32), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
!
! An error occurred while installing Ruby ruby-2.1.1
! For supported Ruby versions see https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
! Note: Only the most recent version of Ruby 2.1 is supported on Cedar-14
! 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/cedar-14/ruby-2.1.1.tgz -s -o - | tar zxf - ' failed unexpectedly:
!
! gzip: stdin: unexpected end of file
! tar: Child returned status 1
! tar: Error is not recoverable: exiting now
!
! Push rejected, failed to compile Ruby app
To [email protected]:user.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:user.git'
我研究了一些可能的解决方案,但似乎都不起作用。我尝试销毁 Heroku 应用程序,然后重新创建它,并尝试使用不同的 ruby 版本,但这似乎也不起作用。
Heroku 不支持 2.1.1 版本
- https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
您需要在 Gemfile 中指定不同的版本:
# Gemfile
source "https://rubygems.org"
ruby '2.1.4' # or other from link above
[...]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)