更改了所有配置,但是为什么Heroku继续使用Ruby-2.0.0?

问题描述 投票:0回答:1

我已经在我的gem文件中添加了Ruby 2.1.5,但是在失败之后,还向配置变量中添加了ruby版本。

但是在部署时,它继续表明我们正在使用2.0.0

remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.7.12

然后由于modware而失败:

remote:        Gem::InstallError: modware requires Ruby version >= 2.1.0.

这是我的宝石文件:

Gemfile
    source 'https://rubygems.org'
    ruby "2.1.5"

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9uWk1aRy5wbmcifQ==” alt =“在此处输入图像描述”>

ruby-on-rails heroku deployment heroku-toolbelt
1个回答
0
投票

在您的终端中输入:

heroku config -s | grep PATH

然后,如果您得到类似的东西

PATH=vendor/bundle/ruby/2.1.5/bin:/usr/local/bin:/usr/bin:/bin

您需要使用此命令行在PATH中的“供应商”之前添加“ bin:”:

heroku config:set PATH=bin:vendor/bundle/ruby/2.1.5/bin:/usr/local/bin:/usr/bin:/bin

来源:https://devcenter.heroku.com/articles/ruby-versions#troubleshooting

© www.soinside.com 2019 - 2024. All rights reserved.