使用 ruby 2.1.0 和 rails 4.2.0 错误创建 Heroku 应用程序

Create Heroku app with ruby 2.1.0 and rails 4.2.0 error

我正在尝试在 Heroku 上创建一个应用程序,但是当我尝试推送到 Heroku 时,出现此错误:

remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote:  !
remote:  !     An error occurred while installing Ruby ruby-2.1.0
remote:  !     For supported Ruby versions see https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote:  !     Note: Only the most recent version of Ruby 2.1 is supported on Cedar-14
remote:  !     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.0.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: 
remote:  !     Push rejected, failed to compile Ruby app

我该如何解决?

来自http://news.railstutorial.org/heroku-update/

"Heroku’s recently announced Cedar-14 stack is incompatible with all but the most recent version of each Ruby sequence, meaning (for example) that it works with Ruby 2.1.4 but not with 2.1.3. Unfortunately, this makes it incompatible with the local Ruby versions on many systems"

看来您需要将 Ruby 更新到最新版本。

Ruby Heroku 不支持 2.1.0。查看 https://devcenter.heroku.com/articles/ruby-support#ruby-versions 以获取受支持版本的列表。