Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 275
Gabe Kopley Avatar asked Jan 09 '12 05:01

Gabe Kopley


People also ask

What version of Ruby does heroku use?

Heroku recommends you run the latest Ruby version your app can handle. Ruby 2.5.


1 Answers

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/

like image 178
Glenn Avatar answered Oct 03 '22 21:10

Glenn