Ruby Applications

Deploy Ruby APIs and backend services with automatic Gemfile dependency installation and scaling.

Overview

RunxBuild installs dependencies from your Gemfile. Your service must listen on the port provided via the PORT environment variable.

Files RunxBuild Looks For

Ensure the following files are in your repository root for proper dependency detection.

1) Gemfile (required):

source "https://rubygems.org"

gem "sinatra"
gem "rackup", "~> 2.3"
gem "puma", "~> 7.2"

2) Gemfile.lock (required for production):

The Gemfile.lock is generated automatically when you run bundle install. Commit this file for reproducible builds.

Basic Sinatra Template

app.rb:

require "sinatra"
require "json"

set :bind, "0.0.0.0"
set :port, ENV["PORT"] || 3000
set :host_authorization, permitted_hosts: []

get "/" do
  content_type :json
  { message: "RunxBuild Ruby service running" }.to_json
end

Recommended Start Command:

bundle exec rackup -o 0.0.0.0 -p $PORT

Deployment Settings

  • Build Command: bundle install
  • Predeploy Command: (leave empty)
  • Output Directory: (leave empty)
  • Start Command: (use framework-specific command above)

Dependencies are installed automatically during build. Only set custom build commands if your project has a non-standard structure.