Ruby deployment guide # ruby diplo; Rails and Sinatra on Deplomo Deploy Ruby on Deplomo for Rails, Sinatra, and Rack. Connect from Git or the CLI, set build and run commands, configure environment variables and a domain, then deploy your Ruby project. Short answer forDeploy Ruby For Rails and Sinatra, connect your code repository so Bundler can install the gems automatically. To learn about Ruby server features, see the [Ruby hosting](/products/ruby) and the guide [Deployment guide](/guides) is available to you. Last reviewed:6 September 2026 ## Prepare your project for Deploy Ruby Add the project dependency files, `Gemfile and Gemfile.lock` to your Git repository. Default build and run commands for this stack: ``` # Build command bundle install && bundle exec rails assets:precompile # Run command bundle exec puma -C config/puma.rb ``` Puma should listen on tcp://0.0.0.0:$PORT. ## Automatic deployment directly from the Git repository - Create a new project and environment in the Deplomo user panel. - Connect the service to the GitHub or GitLab repository and the desired branch. - Set the build and run commands to match your project. - Set the required environment variables, then deploy. - Connect your custom domain in the Domains section and use free SSL. ## Deploy a local folder with Deplomo CLI ``` curl -fsSL https://get.deplomo.com/install.sh | sh deplomo login cd your-project deplomo deploy deplomo logs ``` Use the Deplomo CLI to deploy local code directly without pushing it to Git. On Windows (PowerShell), use `irm https://get.deplomo.com/install.ps1 | iex` instead of the first command. ## Production tips for Ruby - Mark RAILS_MASTER_KEY and DATABASE_URL as secrets. - Review migrations before switching releases. - Run Sidekiq or other workers in a separate service. - Check the health check and startup time before routing live traffic. - Store persistent data and user files on persistent disks or cloud storage. ## Frequently asked questions ### How do I deploy Ruby and Rails apps? For Ruby on Rails, the platform runs bundle install, compiles static assets, and starts the app with Puma. ### How do I configure a database for Ruby on Rails? Set the DATABASE_URL environment variable to provide database connection details to your Ruby app. This avoids hard-coding secrets in project files.