config.ru already wired for Rack. The deployment loop is: install gems, precompile assets, run migrations, restart.
For the underlying tool, see Ruby.
Before you begin
- A Ruby app created in cPanel.
- A Rails app at the application root, with
Gemfile,config.ru, andconfig/environment.rb. - The Ruby version Passenger ships matches what your
Gemfiledeclares. Check withruby --versionover SSH.
Deploy the app
Precompile assets
Over SSH:If memory is tight, precompile on a dev machine and rsync
public/assets/ up.Set the secret base
Rails 5 and later requireSECRET_KEY_BASE in production. Add to Environment variables in the cPanel UI:
Common issues
503: Could not find gem 'rails X.Y.Z'
503: Could not find gem 'rails X.Y.Z'
bundle install ran against a different Ruby. Confirm with bundle env over SSH and re-run bundle install after activating the right Ruby.Asset precompilation OOMs
Asset precompilation OOMs
Build assets locally, rsync
public/assets/ and public/packs/ up. Skip the server-side precompile.Database connection refused
Database connection refused
Use the cPanel database hostname (
localhost typically works for MySQL on the same account). Username and database name come from the cPanel MySQL Databases page.ActiveJob or Sidekiq processes get killed
ActiveJob or Sidekiq processes get killed
Long-running workers exceed the LVE NPROC ceiling. Move them to cron-driven one-shot jobs on a Basic plan, or upgrade.
Need a hand?
Open a ticket
Best for anything that needs an account check or a config change on our end.
Live chat
Faster for quick questions during business hours.

