See Buildpacks for an alternative way to deploy Ruby on Rails applications.

Using Ruby 2.0

manifest.yml must specify the Ruby runtime version and Rails as the framework type:

  runtime: ruby20

The default Ruby version is 1.9.

Known Issues

  • Rmagick gem currently not supported.

  • PostgreSQL Gem (pg) version must be pinned to 0.12.2 (if used):

    gem 'pg', '0.12.2'
  • Must specify Rake Gem immediately before the line loading rails. This happens because when Rails loads, it finds version 0.9.2 of Rake, and that becomes the only version of Rake in the process. Later code wants version, and fails:

    gem 'rake', ''
    gem 'rails'
  • For Ruby 1.9 Cloud Foundry requires a tweak to the jquery-rails gem:

    gem 'cloudfoundry-jquery-rails'

Ruby on Rails 3.1+

To get the asset pipeline working on Helion Stackato, precompile your assets in your development environment, which compiles them into public/assets:

bundle exec rake assets:precompile

Gems and Libraries

A Gemfile must be included in your app that lists all required gems. Run:

$ bundle install
$ bundle package

any time you modify the Gemfile and prior to pushing an app to Helion Stackato.

If VCAP sees a Gemfile.lock in the application, it will ensure the needed gems are packaged, and set the BUNDLE_PATH environment variable to point at them.

Unsupported Gemfile features:

  • Git URLs or branch dependencies
  • gem :path => some/path
  • platform-conditional gems

Database Services

Cloud Foundry supports database auto-reconfiguration for Rails applications.

Worker Applications

Non-HTTP apps that run as a Helion Stackato application under the control of the Health Manager.

To deploy worker applications, you need to use the command: key and set the processes: web: key to Null (~).


name: ruby-app
  type: rails3
  runtime: ruby19
command: ruby worker.rb
  web: ~

General Guidelines

App/Web Servers

For the best performance, using Thin Ruby web server is recommended. Include gem 'thin' in your Gemfile.


First, you need bundler and rails installed locally:

$ sudo gem install rails bundler --no-ri --no-rdoc

Running rake commands

Generally, bundle exec must be used when running any commands that are installed through Gemfile/bundler.

To run rake stats, for instance, run the stackato run command:

$ stackato run <appname> bundle exec rake stats

See the Command Reference for details on the use of stackato run.