Search code examples
ruby-on-railsherokuruby-1.9.3cedar

Is it possible to run my Rails app on Heroku with Ruby 1.9.3? If so, how?


I tried this tip: https://github.com/thoughtbot/laptop/pull/14#issuecomment-3192270 .

On deploy I see

-----> Using RUBY_VERSION: ruby-1.9.3-p0

But my logs show the environment variable is not respected

INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]

Hacky / experimental solutions accepted!

Edit: I am on the cedar stack.


Solution

  • Here's an update for everyone referencing this question... Heroku now allows you to specify your ruby version in your Gemfile, thanks to their addition to the latest version of bundler.

    First run:

    gem install bundler --pre
    

    then add ruby '1.9.3' to your Gemfile as such.

    source 'http://rubygems.org'
    
    ruby '1.9.3'
    gem  'rails', '3.2.3'
    

    The full release from Heroku with details is at http://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku/