我正在尝试将我的rails(4.1.5)应用程序部署到heroku(Cedar堆栈)。 supported ruby versions on Heroku页面列出支持的2.2.0。
我在rbenv中有2.2.0作为我的活动全局版本,并且没有指定本地版本。
My Gemfile包含Heroku所需的ruby '2.2.0'
。
当我拨打git push heroku master
时,它会因以下错误而失败:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: !
remote: ! An error occurred while installing Ruby ruby-2.1.2-p95
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.2-p95.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
这似乎表明heroku正试图在我的机器上安装旧版本的ruby(ruby-2.1.2-p95)并且失败,因为它不是受支持的版本。我怎样才能解决这个问题?