簡體   English   中英

Ruby版本沒有在Heroku上升級

[英]Ruby version is not upgrading on Heroku

我已經將我的應用程序從ruby 1.9.2升級到heroku上的ruby 1.9.3。

我跟着關於它的關於它的文章: https ://devcenter.heroku.com/articles/ruby-versions

當我部署我的應用程序時,我沒有收到任何錯誤:

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

但是應用程序無法正常啟動,如果我拖尾日志,我會看到以下內容:

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=

我無法獲得更多信息告訴我出了什么問題,但我猜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]

當它應該是1.9.3

在我的Gemfile的頂部,我有:

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

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

bundle -v
Bundler version 1.2.0.rc.2

我猜有正確的ruby路徑(就像在文章中一樣):

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

關於我應該運行什么來強制升級到Ruby 1.9.3的任何想法?

謝謝!

我沒有充分注意閱讀文檔。

我的heroku PATH是

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

文件說:

如果沒有或沒有第一個條目,請使用heroku config:add將bin:添加到配置中。 $ heroku config:添加PATH = bin:vendor / bundle / ruby​​ / 1.9.1 / bin:/ usr / local / bin:/ usr / bin:/ bin

不是第一個條目項(不只是存在我認為),顯然我需要在PATH的前面添加的“bin”。

你確定你在Cedar堆棧上嗎? 我相信這是你可以在Heroku上設置Ruby版本的唯一方法。 如果沒有,切換到Cedar堆棧可能會解決您的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM