首页 > 解决方案 > 即使应用程序更新到 ruby​​ 2.5.1,也无法将应用程序推送到 heroku

问题描述

当我为我的 ruby​​ 应用程序执行 git push heroku master 时出现以下错误。

remote: -----> Compiling Ruby/Rails
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-18/ruby- 
2.3.8.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-18/ruby- 
2.3.8.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: 
remote:  !
remote:  !     An error occurred while installing ruby-2.3.8
remote:  !     
remote:  !     This version of Ruby is not available on Heroku-18. 
The minimum supported version
remote:  !     of Ruby on the Heroku-18 stack can found at:
remote:  !     
remote:  !     https://devcenter.heroku.com/articles/ruby- 
support#supported-runtimes
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...

我已经更新了我的 ruby​​ 版本并将 ruby​​ 2.5.1 设置为默认值

rvm list
=* ruby-2.5.1 [ x86_64 ]

'=>' - current
'=*' - current && default
'*' - default 

我正在使用最新的 ruby​​ 版本

红宝石-v

ruby 2.5.1p57(2018-03-29 修订版 63029)[x86_64-darwin17]

我的 gemfile 也是最新的

source 'https://rubygems.org'

ruby '2.5.1'
gem 'rails',        '5.1.6'
gem 'bcrypt',       '3.1.12'
gem 'faker',        '1.7.3'
gem 'will_paginate', '3.1.6'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.3.7'
gem 'puma',         '3.9.1'
gem 'sass-rails',   '5.0.6'
gem 'uglifier',     '3.2.0'
gem 'coffee-rails', '4.2.2'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks',   '5.0.1'
gem 'jbuilder',     '2.7.0'

...

标签: ruby-on-railsrubygitherokuheroku-cli

解决方案


让它工作。问题是我没有成功添加并提交我的更改,即使我已将我的应用程序更新到 2.5.1

必须: git add -A git commit -m "关于将应用程序更新到 2.5.1 的随机消息" git push heroku master


推荐阅读