Ruby版本在Heroku上不升级 [英] Ruby version is not upgrading on Heroku

查看:91
本文介绍了Ruby版本在Heroku上不升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我跟着关于heroku的文章:
< https://devcenter.heroku.com/articles/ruby-versions

b
$ b

当我部署我的应用程序时,我没有收到任何错误:

 > -----> Ruby / Rails应用检测到
> ----->使用Ruby版本:ruby-1.9.3
> ----->使用Bundler版本1.2.0.rc.2安装依赖项运行:bundle install --without development:test --path
> vendor / bundle --binstubs bin / --deployment从
获取gem元数据> http://rubygems.org / .......从
获取宝石元数据> http://rubygems.org/ ..使用rake(0.9.2.2)使用i18n(0.6.0)
> ..............
> ----->发现进程类型Procfile声明类型 - > worker Ruby / Rails的默认类型 - >控制台,耙,网
> ----->编译的段塞大小是27.0MB
> ----->启动完成,v157 http://riskyshower.herokuapp.com部署到Heroku

但是应用程序无法正常启动,如果我尾巴的日志,我看到以下内容:

  2012-08-16T10:21 :26 + 00:00 heroku [路由器]:错误H10(应用程序崩溃) - > 2012年7月16日10点21分27秒+ 00:00 heroku [路由器]:错误H10(应用程序崩溃) - > GET my_domain.me/ dyno =队列=等待=服务=状态= 503字节= 
GET my_domain.me/favicon.ico dyno = queue = wait = service = status = 503 bytes =

我无法获得更多信息告诉我什么是错误的,但我猜Ruby没有正确升级,因为当我这样做时:

  heroku运行ruby -v
运行ruby -v附加到终端... up,run.1
ruby​​ 1.9.2p290(2011-07-09 revision 32553)[x86_64 -linux]

当它应该是1.9.3



在我的Gemfile的顶部,我有:

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

我正在使用最新版本的bundler:

  bundle -v 
Bundler version 1.2.0.rc.2

并且我有正确的路径来进行ruby测试(比如文章中):

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

关于我应该运行什么来强制升级到Ruby 1.9.3的想法?

谢谢! / p>

解决方案

我没有仔细阅读相关文档。



我的heroku PATH是:

$ $ p $ vendor / bundle / ruby​​ / 1.9.1 / bin:/ usr / local / bin:/ usr / bin:/ bin

文档说明:

< blockquote>

如果没有或没有第一个条目,将bin:添加到配置中,使用heroku
config:add。 $ heroku config:add
PATH = bin:vendor / bundle / ruby​​ / 1.9.1 / bin:/ usr / local / bin:/ usr / bin:/ bin


不是第一个词条词语(不是简单的 present ,因为我认为),显然我需要添加'bin' $ PATH前面。​​


I have upgraded my application from ruby 1.9.2 to ruby 1.9.3 on heroku.

I followed the article on heroku about it: 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 :

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

At the top of my Gemfile I have:

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

I'm using the latest version of bundler:

bundle -v
Bundler version 1.2.0.rc.2

And I have the correct path to ruby I guess (like in the article):

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?

Thanks!

解决方案

I didn't read the documentation with enough attention.

My heroku PATH was

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 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.

这篇关于Ruby版本在Heroku上不升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆