Reputation: 1033
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!
Upvotes: 3
Views: 839
Reputation: 1033
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.
Upvotes: 3
Reputation: 181
Are you sure you're on the Cedar stack? I believe that's the only way you can set the Ruby version that way on Heroku. If not, switching to the Cedar stack might solve your problem.
Upvotes: 2