Skip to content

Instantly share code, notes, and snippets.

@jakcharlton
Created February 18, 2012 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakcharlton/1861173 to your computer and use it in GitHub Desktop.
Save jakcharlton/1861173 to your computer and use it in GitHub Desktop.
Ruby 1.9.3 and Rails 3.2 on Heroku

http://railsapps.github.com/rails-heroku-tutorial.html

Ruby 1.9.3 and Rails 3.2 on Heroku Heroku’s newest stack, “Celadon Cedar,” supports Rails 3.2 but installs Ruby 1.9.2 by default. Ruby 1.9.3 is recommended for Rails 3.2.

You can configure the Heroku environment to use Ruby 1.9.3.

Note: Heroku makes it clear that Ruby 1.9.3 on Heroku is experimental, which means “no support, the ruby_version will change in the future, and this feature may change or be removed without warning.” In response to an inquiry on January 31, 2012, Heroku said, “there is no timeline yet” to fully support Ruby 1.9.3.

Install the heroku-labs plugin:

$ heroku plugins:install https://github.com/heroku/heroku-labs.git

Enable the “user_env_compile” feature (see Heroku’s documentation):

$ heroku labs:enable user_env_compile -a myapp

Set the RUBY_VERSION variable:

$ heroku config:add RUBY_VERSION=ruby-1.9.3-p0

Set the Heroku PATH config variable to include “bin”:

$ heroku config:add PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin

(Yes, the library path includes “1.9.1”: that’s not a typo.)

You can check that everything has been configured correctly by running:

$ heroku config

Documentation for Rails 3.0 and Rails 3.1 Heroku has no specific documentation for Rails 3.2 but the following articles on Rails 3.0 and Rails 3.1 are helpful:

Getting started with Rails 3 on Heroku/Cedar Rails 3.1 on Heroku Cedar. Note: Prior to Rails 3.1.0.rc5, Heroku required an additional gem therubyracer-heroku. This gem is no longer needed for Rails 3.2 and should not be used.

@clm-a
Copy link

clm-a commented Apr 15, 2012

You may wanna use 1.9.3-p125 and consider some updates on the tutorial :-) https://gist.github.com/2392640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment