Ruby

Detected from a Gemfile. Bundler installs gems without development and test groups.

See Buildpacksfor how detection and version policy work. A tree that also has package.json gets Node.jsin the same build (Rails with a JS pipeline).

Detects

Gemfile in the base directory.

Versions

Default is Ruby 3.4. Published lines as of September 2026: 3.3, 3.4, 4.0. You get the latest patch of the requested minor.

Pin, in this order:

  • .ruby-version (a ruby- prefix is stripped)
  • A ruby "3.4.10" line in the Gemfile (full x.y.z)

Bundler comes from the BUNDLED WITH stanza in Gemfile.lock, or 2.5.6 if that stanza is missing.

Install and build

bundle install with BUNDLE_WITHOUT=development:test and deployment mode. Rails apps (config/environment.rb) run rake assets:precompile when that task exists. The precompile uses RAILS_ENV=production and SECRET_KEY_BASE_DUMMY=1.

Launch defaults include RAILS_ENV and RACK_ENV as production, logs to stdout, and RAILS_SERVE_STATIC_FILES=enabled.

Start command

  • config/puma.rb: bundle exec puma -C config/puma.rb
  • config.ru: bundle exec rackup config.ru -p $PORT (5000 if PORT is unset)
  • Otherwise: bundle exec ruby app.rb

Make Puma or Rack listen on PORT. Override with a Procfile.