FerryDocs

Ruby

Ferry builds a Ruby app from its Gemfile and starts it with rackup.

Edit on GitHub

Detect. Ferry finds a Gemfile.

1 / 5

A minimal example

Gemfile
Gemfile.lock
config.ru
Gemfile
source "https://rubygems.org"

gem "rack", "~> 3.1"
gem "rackup", "~> 2.2"
gem "puma", "~> 6.4"
config.ru
run ->(env) { [200, { "content-type" => "text/plain" }, ["Hello from Ruby on Ferry\n"]] }
Terminal
ferry up hello-ruby --follow

What Ferry generates

StepWhat Ferry generates
ruby:<version>-slim. The default is 3.3. Ferry uses the major.minor of .ruby-version, or of the ruby line of the Gemfile, if there is one.
System packagesbuild-essential git libpq-dev libyaml-dev pkg-config, plus default-libmysqlclient-dev for mysql2.
Installbundle install
BuildYour build command, if you set one.
Startbundle exec rackup -o 0.0.0.0 -p ${PORT:-10000}, when the project has a config.ru.

Rails

Add a :

Procfile
web: bundle exec rails server -b 0.0.0.0 -p $PORT

Then use ferry env set for the that Rails needs in production (RAILS_ENV, SECRET_KEY_BASE…).

On this page