Ruby版本在Heroku上不升级

编程入门 行业动态 更新时间:2024-10-28 14:22:09
本文介绍了Ruby版本在Heroku上不升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我跟着关于heroku的文章: < devcenter.heroku/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 / .......从获取宝石元数据> rubygems/ ..使用rake(0.9.2.2)使用i18n(0.6.0)> .............. > ----->发现进程类型Procfile声明类型 - > worker Ruby / Rails的默认类型 - >控制台,耙,网> ----->编译的段塞大小是27.0MB > ----->启动完成,v157 riskyshower.herokuapp部署到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'rubygems' 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

文档说明:

如果没有或没有第一个条目,将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: devcenter.heroku/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 > rubygems/....... Fetching gem metadata from > rubygems/.. 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 riskyshower.herokuapp 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 'rubygems' 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上不升级

本文发布于:2023-10-13 09:24:29,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上不   版本   Ruby   Heroku

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!