page:guides:rails:schema changes

Apply database schema changes for Rails

Summary

Schema changes for a Rails app on Ample. Verified on Rails: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok). Build and start: bundle install into vendor/bundle from Gemfile.lock (development and test groups skipped), then Puma via rails server reading PORT on the ruby-3.4 template with RAILS_ENV=production.

Representative Queries

Resource Requirements

Infrastructure Requirements

  1. Compute:
    • Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
  2. Postgres:
    • Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.

Framework

Rails

Workload

Apply database schema changes

Release Status

Published

Support Status

Verified

Execution Status

Ready

Prerequisites

Workflow Steps

  1. Build and start:
    • bundle install into vendor/bundle from Gemfile.lock (development and test groups skipped), then Puma via rails server reading PORT on the ruby-3.4 template with RAILS_ENV=production; the server must bind 0.0.0.0 on PORT.
  2. Run migrations as the release command:
    • Ample runs the command before activation and fails the release if it exits non-zero; keep migrations idempotent.
    • Command: ample deploy . --name --public --release-command "python3 migrate.py"
  3. Verify:
    • Fetch the live URL and /p/migrated on the example; on failure read the build and runtime logs.
    • Command: ample logs --kind build

Examples

Success Checks

  1. App responds on its public URL:
    • Expect: ample canary rails patterns
  2. Migrated check from the example:
    • Expect: see the pattern fixture checks

Limitations

Cost Estimate

Evidence Summary

Last Verified At

2026-09-20T21:55:28Z

Unknowns

Formats

Next Actions

  1. Browse the catalog index
    • Operation ID: catalog_index
    • Method: GET
    • Relative Path: /v1/catalog
    • Requires Authentication: false
  2. Search published recipes by intent, stack and constraints
    • Operation ID: search_recipes
    • Method: POST
    • Relative Path: /v1/catalog/search
    • Requires Authentication: false
    • Parameters: Limit: 5, Query: Apply database schema changes for Rails
  3. Prepare a side-effect-free deployment plan for an authorized project
    • Operation ID: plan_deployment
    • Method: POST
    • Relative Path: /v1/catalog/plan
    • Requires Authentication: true
  4. Additional browsing options related to frameworks and deployment configurations.