Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Heroku's Ruby Buildpack for Cedar
Ruby Shell

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
vendor
README.md
Rakefile

README.md

Ruby Language Pack

The Ruby Language Pack requires a Gemfile and Gemfile.lock file to be recognized as a ruby app. It will then proceed to run bundle install after setting up the appropriate environment for ruby and bundler.

Bundler

For non-windows Gemfile.lock files, the --deployment flag will be used. The vendor/bundle directory is cached between builds to allow for faster bundle install times. bundle clean is used to ensure no stale gems are stored between builds.

Rails

A rails_log_stdout is installed by default so Rails' logger will log to STDOUT and picked up by Heroku's logplex.

Rails 3

To enable static assets being served on the dyno, rails3_serve_static_assets is installed by default. If the execjs gem is detected then node will be vendored. The assets:precompile rake task will get run if no public/manifest.yml is detected. See this article on how rails 3.1 works on cedar.

Auto Injecting Plugins

Any vendored plugin can be stopped from being installed by creating the directory it's installed to in the slug. For instance, to prevent rails_log_stdout plugin from being injected, add vendor/plugins/rails_log_stdout/.gitkeep to your git repo.

Ruby Language Pack Flow

Here's the basic flow of how the language pack works:

Ruby (Gemfile and Gemfile.lock is detected)

  • runs bundler
  • installs binaries

Rack (config.ru is detected)

  • everything from Ruby
  • sets RACK_ENV=production

Rails 2 (config/environment.rb is detected)

  • everything from Rack
  • sets RAILS_ENV=production
  • install rails 2 plugins

Rails 3 (config/application.rb is detected)

  • everything from Rails 2
  • install rails 3 plugins
  • installs node if the gem execjs is detected
  • runs rake assets:precompile if the rake task is detected
Something went wrong with that request. Please try again.