【问题标题】:Ruby on Rails - Error on installfest deploying rails appRuby on Rails - installfest 部署 Rails 应用程序时出错
【发布时间】:2019-03-08 17:00:25
【问题描述】:

我一直在尝试通过 Rails Bridge Installfest http://installfest.railsbridge.org/installfest/deploy_a_rails_app 上的 Installfest 步骤,但无法克服我遇到的这个错误。

我在部署 Rails 应用程序的第 2.5 步,并且正在使用带有 High Sierra 的 Mac。在进入步骤 2.5 之前,我没有遇到任何问题。当我执行“git push heroku master”时,我收到一条错误消息:

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.7.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.7.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: 
remote: !
remote: ! An error occurred while installing ruby-2.3.7
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: ! [link]
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote: 
remote: ! Push failed

安装 ruby​​-2.3.7 时出错

但是,当我执行 Ruby -V 时,我得到了

ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17], the version it says I need.

如果有人可以提供帮助或提供建议,我将不胜感激!

【问题讨论】:

标签: ruby-on-rails ruby git heroku


【解决方案1】:

问题不在您的计算机上,而是在 Heroku 上。您使用 Heroku 不再支持的 Ruby 版本 - 请参阅 Heroku's list of support Ruby version

您可以通过将以下行添加到您的Gemfile 来更新 Heroku 应该使用的 Ruby 版本:

source "https://rubygems.org"
ruby "2.3.8"                     # <- this is the line to add

selecting a version of Ruby

您可能需要考虑更新到最新的 Ruby 版本(当前为 2.5.3)。但这意味着您可能还需要在您的计算机上更新 Ruby——如何更新取决于您的操作系统和安装 Ruby 的方式。

【讨论】:

  • 谢谢,成功了!我感谢您的帮助。我在 test_app 中更新了 Ruby,但是当我想创建一个新应用程序时,它又恢复到旧应用程序?
猜你喜欢
  • 2016-12-25
  • 2012-09-15
  • 1970-01-01
  • 2016-01-06
  • 2015-04-07
  • 1970-01-01
  • 1970-01-01
  • 2018-06-10
  • 2012-06-21
相关资源
最近更新 更多