> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sevalla.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These are the docs for Sevalla, a platform for deploying applications, databases, static sites, object storage and load balancers. The dashboard is at https://app.sevalla.com.
> Bold text in steps is an exact dashboard label.
> To act on a Sevalla account, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md), then the Sevalla CLI (https://docs.sevalla.com/developer-tools/cli.md), then the REST API (https://api-docs.sevalla.com, OpenAPI spec at https://api.sevalla.com/v3/openapi.json).
> Every page index is at https://docs.sevalla.com/llms.txt.

# Rails

> Guides for running Rails 8.1 on Sevalla: deploy with Puma and PostgreSQL, then add Solid Queue background jobs, Active Storage on object storage and caching.

The Rails guides take a Rails 8.1 application from `rails new` to a running Sevalla application, which [Ingot](https://docs.sevalla.com/applications/builds/ingot.md) builds from your repository with no build configuration, then add one capability each. Start with the deploy guide: the others build on the application it creates.

> **[Deploy Rails](https://docs.sevalla.com/guides/ruby/rails/deploy.md)**
>
> Puma, a PostgreSQL database, `db:prepare` in a job, and an optional Dockerfile.

> **[Background jobs](https://docs.sevalla.com/guides/ruby/rails/background-jobs.md)**
>
> Run Active Job with Solid Queue in a background worker or inside Puma, with recurring tasks.

> **[Object storage](https://docs.sevalla.com/guides/ruby/rails/object-storage.md)**
>
> Store Active Storage uploads in a bucket, with direct uploads and image variants.

> **[Caching](https://docs.sevalla.com/guides/ruby/rails/caching.md)**
>
> Cache with Solid Cache in PostgreSQL, or in a Redis or Valkey database.

## How the guides fit together

The deploy guide creates `storefront`, a Rails application with a `Product` resource, and deploys it as one Sevalla application with:

* a **web process** that runs Puma with `bin/rails server`,
* a **job** named `Migrate` that runs `bin/rails db:prepare` before each deployment,
* a Sevalla **PostgreSQL database**, reached over an internal connection as `DATABASE_URL`.

Rails 8 keeps its cache, its job queue and Action Cable's messages in their own databases by default. The deploy guide puts their tables in the application's one database instead, so the other guides need no new PostgreSQL database: Solid Queue and Solid Cache already have their tables when you start them.

Each of the other guides adds to that application:

| Guide | Adds | Changes to the Dockerfile |
| - | - | - |
| [Background jobs](https://docs.sevalla.com/guides/ruby/rails/background-jobs.md) | A background worker that runs `bin/jobs`, or Solid Queue inside Puma | None |
| [Object storage](https://docs.sevalla.com/guides/ruby/rails/object-storage.md) | A bucket, the `aws-sdk-s3` gem and Active Storage's tables | None: the deploy guide's image already has `libvips` for image variants |
| [Caching](https://docs.sevalla.com/guides/ruby/rails/caching.md) | Solid Cache, or a Redis or Valkey database with the `redis` gem | None |

Every guide works with both build strategies: Ingot, the default, and the Dockerfile from [Deploy with a Dockerfile](https://docs.sevalla.com/guides/ruby/rails/deploy.md#deploy-with-a-dockerfile). For how Ruby applications build and run on Sevalla in general, see [Deploy Ruby applications](https://docs.sevalla.com/guides/ruby/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.