Ruby

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

Step-by-step deploy guides: Ruby, Ruby on Rails.

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. Without it, the builder uses its pinned version: Bundler 2 for Ruby 3, Bundler 4 for Ruby 4.

Install and build

bundle install with BUNDLE_WITHOUT=development:test, in deployment mode when a Gemfile.lock exists (without a lockfile, Bundler resolves the gems during the build). 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.

Give your agent a cloud.

Earn up to 15 € in credit when signing up.

Continue with GitHub

or with email

Stay in the loop.

Product news, no spam. Unsubscribe anytime.