简体   繁体   English

Ruby版本没有在Heroku上升级

[英]Ruby version is not upgrading on Heroku

I have upgraded my application from ruby 1.9.2 to ruby 1.9.3 on heroku. 我已经将我的应用程序从ruby 1.9.2升级到heroku上的ruby 1.9.3。

I followed the article on heroku about it: https://devcenter.heroku.com/articles/ruby-versions 我跟着关于它的关于它的文章: https ://devcenter.heroku.com/articles/ruby-versions

When I deployed my application, I didn't get any error: 当我部署我的应用程序时,我没有收到任何错误:

> -----> Ruby/Rails app detected
> -----> Using Ruby version: ruby-1.9.3
> -----> Installing dependencies using Bundler version 1.2.0.rc.2 Running: bundle install --without development:test --path
> vendor/bundle --binstubs bin/ --deployment Fetching gem metadata from
> http://rubygems.org/....... Fetching gem metadata from
> http://rubygems.org/.. Using rake (0.9.2.2) Using i18n (0.6.0)
> ..............
> -----> Discovering process types Procfile declares types -> worker Default types for Ruby/Rails -> console, rake, web
> -----> Compiled slug size is 27.0MB
> -----> Launching... done, v157 http://riskyshower.herokuapp.com deployed to Heroku

But the application can't be launched properly, if I tail the logs, I see the following: 但是应用程序无法正常启动,如果我拖尾日志,我会看到以下内容:

2012-08-16T10:21:26+00:00 heroku[router]: Error H10 (App crashed) -> GET my_domain.me/ dyno= queue= wait= service= status=503 bytes=
2012-08-16T10:21:27+00:00 heroku[router]: Error H10 (App crashed) -> GET my_domain.me/favicon.ico dyno= queue= wait= service= status=503 bytes=

I can't get any more info to tell me what is wrong, but I guess Ruby hasn't been upgraded properly, because when I do : 我无法获得更多信息告诉我出了什么问题,但我猜Ruby还没有正确升级,因为当我这样做时:

heroku run "ruby -v"
Running ruby -v attached to terminal... up, run.1
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

When it's supposed to be 1.9.3 当它应该是1.9.3

At the top of my Gemfile I have: 在我的Gemfile的顶部,我有:

source 'http://rubygems.org'
ruby '1.9.3'

I'm using the latest version of bundler: 我正在使用最新版本的bundler:

bundle -v
Bundler version 1.2.0.rc.2

And I have the correct path to ruby I guess (like in the article): 我猜有正确的ruby路径(就像在文章中一样):

heroku config -s | grep PATH
PATH=vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin:bin

Any idea on what I should run to force the upgrade to Ruby 1.9.3? 关于我应该运行什么来强制升级到Ruby 1.9.3的任何想法?

Thanks! 谢谢!

I didn't read the documentation with enough attention. 我没有充分注意阅读文档。

My heroku PATH was 我的heroku PATH是

vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin

The documentation says: 文件说:

If absent or not the first entry, add bin: to the config with heroku config:add. 如果没有或没有第一个条目,请使用heroku config:add将bin:添加到配置中。 $ heroku config:add PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin $ heroku config:添加PATH = bin:vendor / bundle / ruby​​ / 1.9.1 / bin:/ usr / local / bin:/ usr / bin:/ bin

Not the first entry term (not simply present as I thought), obviously I needed to add the 'bin' in front of the PATH. 不是第一个条目项(不只是存在我认为),显然我需要在PATH的前面添加的“bin”。

Are you sure you're on the Cedar stack? 你确定你在Cedar堆栈上吗? I believe that's the only way you can set the Ruby version that way on Heroku. 我相信这是你可以在Heroku上设置Ruby版本的唯一方法。 If not, switching to the Cedar stack might solve your problem. 如果没有,切换到Cedar堆栈可能会解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM