Ruby Buildpack
Page last updated: February 20, 2015
Use the Ruby buildpack with Ruby, Rack, Rails or Sinatra applications.
See the following topics:
- Getting Started Deploying Ruby Apps
- Getting Started Deploying Ruby on Rails Apps
- Deploy a Sample Ruby on Rails App
- Configure a Production Server for Ruby Apps
- Configure Rake Tasks for Deployed Apps
- Tips for Ruby Developers
- Environment Variables Defined by the Ruby Buildpack
- Configure Service Connections for Ruby
The source for the buildpack is here.
Buildpack Logging and Application Logging
The buildpack only runs during the staging process, and only logs what is important to staging, such as what is being downloaded, what the configuration is, and work that the buildpack does on your application.
The buildpack stops logging when the staging process finishes. Application logging is a separate concern.
If you are deploying a Ruby, Rack, or Sinatra application, your application must write to STDOUT or STDERR to include its logs in the Loggregator stream. See Application Logging in Cloud Foundry.
If you are deploying a Rails application, the buildpack may or may not automatically install the necessary plugin or gem for logging, depending on the Rails version of the application:
- Rails 2.x: The buildpack automatically installs the
rails_log_stdout
plugin into the application. - Rails 3.x: The buildpack automatically installs the
rails_12factor
gem if it is not present and issues a warning message. - Rails 4.x: The buildpack only issues a warning message that the
rails_12factor
gem is not present, but does not install the gem.
You must add the rails_12factor
gem to your Gemfile
to quiet the warning message.
For more information about the rails_log_stdout
plugin, refer to the Github README.
For more information about the rails_12factor
gem, refer to the Github README.