w wokku
Get Started
~/docs
/
frameworks

# Deploy Ruby on Rails

Updated · Edit on GitHub ↗

Deploy a Rails app to Wokku with Postgres, migrations on release, and asset
precompilation handled automatically.

Prerequisites

1. Create the app

Apps → New App → server, name my-rails-app, box size, Create.

2. Prepare your Rails app

The Ruby buildpack detects Rails from your Gemfile and precompiles assets
automatically. Add a Procfile:

procfile
web: bin/rails server -p $PORT -e $RAILS_ENV
release: bin/rails db:migrate

The release process runs migrations after a successful build, before traffic
shifts — zero-downtime deploys.

3. Set environment variables

App → Config:

Key Value
RAILS_MASTER_KEY contents of config/master.key
RAILS_ENV production
RAILS_SERVE_STATIC_FILES true
RAILS_LOG_TO_STDOUT true
// careful

4. Add a database

bash
wokku addons:create postgres my-rails-app

Wokku injects DATABASE_URL, which Rails reads natively in production. See
Create & Link a Database.

5. Deploy

bash
git remote add wokku git@git.wokku.cloud:my-rails-app
git push wokku main

Live at https://my-rails-app.wokku.app.

Background jobs

Run Sidekiq/Solid Queue as a second process — add worker: to your Procfile
and scale it. See Bundled Processes.

Custom domain

Custom Domains — SSL is automatic.

Troubleshooting

  • ActiveSupport::MessageEncryptor::InvalidMessage — wrong/missing RAILS_MASTER_KEY.
  • Assets 404 — set RAILS_SERVE_STATIC_FILES=true (or use a CDN).
  • Migrations didn’t run — confirm the release: line and check deploy logs.

Next steps

Was this page helpful?