推送Heroku应用时出现红宝石错误

时间:2018-08-20 01:05:32

标签: ruby heroku rubygems

我正在尝试在Heroku上设置一个应用程序,以帮助我进行Spotify SDK的令牌交换。我正在关注Heroku上的文档,但是无论我做什么,都会不断收到此错误。当我对他们的示例node-js-getting-started应用程序执行相同的过程时,一切正常。没有错误。我复制相同的过程,但改用SpotifyTokenSwap回购。已安装Ruby ruby​​ 2.1.5p273。我刚刚验证了这一点。

谁能告诉我发生了什么事?

$ git push heroku master

Counting objects: 58, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (58/58), 9.20 KiB | 3.07 MiB/s, done.
Total 58 (delta 24), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rack
remote:        Command: '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/heroku-16/ruby-2.1.5.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote:        Command: '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/heroku-16/ruby-2.1.5.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: 
remote:  !
remote:  !     An error occurred while installing ruby-2.1.5
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/heroku-16/ruby-2.1.5.tgz -s -o - | tar zxf - ' failed unexpectedly:
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
remote: Verifying deploy...
remote: 
remote: !   Push rejected to guarded-tor-50875.
remote: 
To https://git.heroku.com/guarded-tor-50875.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/guarded-tor-50875.git'

1 个答案:

答案 0 :(得分:1)

Heroku不支持您指定的红宝石版本2.1.5

参考Heroku开发文档

[Heroku Dev] Supported ruby version

您可以在宝石列表

中更新红宝石版本