page:guides:rails:deployment diagnostics
Diagnose Deployment Failures for Rails
Deployment diagnostics for a Rails app on Ample. Verified on Rails: the same app deployed with a deliberate boot failure (CANARY_FAIL=boot): ample deploy exited 1 with a coded failure (health_check_failed when the process dies at boot, public_ingress_failed when the framework boots but every request answers 500) and the app's own error line was readable with ample logs --kind runtime, so the cause is read from the framework's output rather than guessed.
Build and Start:
bundle installinto vendor/bundle from Gemfile.lock (development and test groups skipped)- Start Puma via
rails serverreading PORT on the ruby-3.4 template with RAILS_ENV=production.
Representative Queries
- Diagnose deployment failures for Rails
- Where can I host Diagnose deployment failures built with Rails?
- I need framework-specific failure signatures and validation checks using only actual available observability interfaces.
Prerequisites
- A Rails project (bundle install into vendor/bundle from Gemfile.lock (development and test groups skipped), then Puma via
rails serverreading PORT on the ruby-3.4 template with RAILS_ENV=production) - An Ample account token with servers:write
Workflow Steps
- Read the Failure Code:
- Deploy is synchronous. Exit 1 with build_failed means the isolated build failed; health_check_failed means the app built but never answered on PORT; public_ingress_failed means it answered on PORT but the public URL returned an error status; exit 2 means a required preflight action is blocking.
- Read the Build Log:
- The last lines name the failing command and its output.
- Command:
ample logs --kind build
- Read the Runtime Log:
- For health_check_failed the runtime log carries the Rails process output.
- Command:
ample logs --kind runtime
- Fix and Redeploy Once:
- Change the source, the environment or the command override, then run ample deploy again.
- Verify:
- Fetch the live URL on the example; on failure read the build and runtime logs.
- Command:
ample logs --kind build
Limitations
- Verified on the ruby-3.4 template at s-1vcpu-1gb; other sizes and Rails major versions are not verified.
- Region, compliance attestations and request-duration limits are unknown and not claimed.
Cost Estimate
- Currency: USD
- Monthly Amount: $5.00
- Basis: Size prices from pricing.toml at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty.
- Components:
- App server: Size s-1vcpu-1gb, Quantity 1.0, Monthly Amount $5.00
Next Actions
- Browse the catalog index: GET /v1/catalog
- Search published recipes: POST /v1/catalog/search
- Prepare a side-effect-free deployment plan: POST /v1/catalog/plan
- Read the existing agent authentication setup: GET /mcp/setup
- Browse Rails: GET /v1/catalog/nodes/stack%3Aframework-rails
- Browse Troubleshoot deployment: GET /v1/catalog/nodes/intent%3Atroubleshoot-deployment
- Browse Public web service: GET /v1/catalog/nodes/pattern%3Apublic-web-service