RubyonRails-installfest部署Rails应用程序时出错



我一直在尝试在Rails Bridge Installfest上完成Installfest步骤http://installfest.railsbridge.org/installfest/deploy_a_rails_app无法克服我犯的这一个错误。

我在部署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.

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

问题不在您的计算机上,而是在Heroku上。您使用的Ruby版本不再受Heroku支持——请参阅Heroku的支持Ruby版本列表。

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

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

请参阅选择Ruby 的版本

您可能需要考虑更新到最新的Ruby版本(当前为2.5.3(。但这意味着你可能也需要在你的电脑上更新Ruby——如何更新取决于你的操作系统和你如何安装Ruby。

相关内容

最新更新