{"catalogRevision":"cat_f13ab9a494120b5e","recipeId":"page:guides:rails:deployment-diagnostics","recipeRevision":"r1","canonicalPath":"/guides/rails/deployment-diagnostics","label":"Diagnose deployment failures for Rails","family":"Framework operation","summary":"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 <deployment_id> --kind runtime`, so the cause is read from the framework's output rather than guessed. 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.","representativeQueries":["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."],"breadcrumbIds":["discovery","stack","stack:frameworks","stack:framework-rails","page:guides:rails:deployment-diagnostics"],"breadcrumbs":[{"id":"discovery","label":"Agent hosting discovery","canonicalPath":"/discover/discovery","kind":"root"},{"id":"stack","label":"Frameworks and execution targets","canonicalPath":"/discover/stack","kind":"facet"},{"id":"stack:frameworks","label":"Frameworks","canonicalPath":"/discover/stack/frameworks","kind":"group"},{"id":"stack:framework-rails","label":"Rails","canonicalPath":"/discover/stack/framework-rails","kind":"atom"},{"id":"page:guides:rails:deployment-diagnostics","label":"Diagnose deployment failures for Rails","canonicalPath":"/guides/rails/deployment-diagnostics","kind":"recipe"}],"parentIds":["stack:framework-rails","intent:troubleshoot-deployment","pattern:public-web-service"],"parents":[{"id":"stack:framework-rails","label":"Rails","canonicalPath":"/discover/stack/framework-rails","kind":"atom"},{"id":"intent:troubleshoot-deployment","label":"Troubleshoot deployment","canonicalPath":"/discover/intent/troubleshoot-deployment","kind":"atom"},{"id":"pattern:public-web-service","label":"Public web service","canonicalPath":"/discover/pattern/public-web-service","kind":"atom"}],"resourceRequirements":["primitive:compute"],"infrastructureRequirements":[{"primitiveId":"primitive:compute","label":"Compute","canonicalPath":"/discover/primitive/compute","status":"verified","summary":"Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes."}],"framework":"Rails","workload":"Diagnose deployment failures","releaseStatus":"published","supportStatus":"verified","executionStatus":"unbound","docsOnly":true,"prerequisites":["A Rails project (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)","An Ample account token with servers:write"],"testedConfiguration":{"template":"ruby-3.4","runtime":"ruby","size":"s-1vcpu-1gb","install":"bundle config set --local path vendor/bundle && bundle config set --local without 'development test' && bundle install","start":"bundle exec rails server -b 0.0.0.0 -p $PORT"},"inputSchema":null,"outputSchema":null,"workflowSteps":[{"title":"Read the failure code","body":"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 (it crashed at boot or bound the wrong port); public_ingress_failed means it answered on PORT but the public URL returned an error status (a request handler or bootstrap failed); exit 2 means a required preflight action is blocking."},{"title":"Read the build log","body":"The last lines name the failing command and its output.","command":"ample logs <deployment_id> --kind build"},{"title":"Read the runtime log","body":"For health_check_failed the runtime log carries the Rails process output: in the verified run the deliberate boot failure's own error line was there, followed by the platform's health-check verdict and the start command it ran.","command":"ample logs <deployment_id> --kind runtime"},{"title":"Fix and redeploy once","body":"Change the source, the environment or the command override, then run ample deploy again. Do not loop deploys to poll status; an unchanged redeploy is a no-op."},{"title":"Verify","body":"Fetch the live URL on the example; on failure read the build and runtime logs.","command":"ample logs <deployment_id> --kind build"}],"examples":[{"title":"Rails pattern fixture","description":"Verified deployment diagnostics on Rails.","sourceRef":"tests/deploy-canaries/rails-patterns"}],"successChecks":[{"description":"failed deploy reports health_check_failed synchronously","kind":"manual","expect":"ample deploy exits 1 with error.code health_check_failed"},{"description":"runtime log carries the app's own error line","kind":"manual","expect":"ample logs <deployment_id> --kind runtime shows the framework's error output before the health-check verdict"}],"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."],"costEstimate":{"currency":"USD","monthlyAmount":5.0,"authoritative":true,"basis":"size prices from pricing.toml (loaded by the API) at build revision 7cf090725a6f16dd91af7d28356fe72c1b404d6e","components":[{"name":"app server","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0}],"note":"Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included."},"evidenceSummary":[{"kind":"canary_run","summary":"Rails pattern fixture deployed on Ample with CANARY_FAIL=boot (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 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 <deployment_id> --kind runtime`, so the cause is read from the framework's output rather than guessed.","observedAt":"2026-09-21T03:15:51Z","implementationRevision":"49962bc (CLI 0.1.21)","expiresAt":"2027-03-20T03:15:51Z","scope":{"checks":[],"template":"ruby-3.4"}}],"lastVerifiedAt":"2026-09-21T03:15:51Z","mcpBinding":null,"unknowns":["region availability is unknown until a verified region fact is recorded","compliance attestations are unknown; none are claimed"],"formats":{"html":"https://ample.computer/guides/rails/deployment-diagnostics","markdown":"https://ample.computer/guides/rails/deployment-diagnostics.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Aguides%3Arails%3Adeployment-diagnostics"},"nextActions":[{"actionId":"browse-catalog","label":"Browse the catalog index","operationId":"catalog_index","method":"GET","relativePath":"/v1/catalog","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"search-recipes","label":"Search published recipes by intent, stack and constraints","operationId":"search_recipes","method":"POST","relativePath":"/v1/catalog/search","origin":"api","parameters":{"body":{"limit":5,"query":"Diagnose deployment failures for Rails"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:guides:rails:deployment-diagnostics","label":"Prepare a side-effect-free deployment plan for an authorized project","operationId":"plan_deployment","method":"POST","relativePath":"/v1/catalog/plan","origin":"api","parameters":{"body":{"inputs":{},"projectId":"<workspace or server id you own>","recipeId":"page:guides:rails:deployment-diagnostics","recipeRevision":"r1"}},"requiresAuthentication":true,"requiresApproval":false},{"actionId":"auth-setup","label":"Read the existing agent authentication setup","operationId":"existing_auth_setup","method":"GET","relativePath":"/mcp/setup","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:stack:framework-rails","label":"Browse Rails","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/stack%3Aframework-rails","origin":"api","parameters":{"nodeId":"stack:framework-rails"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:intent:troubleshoot-deployment","label":"Browse Troubleshoot deployment","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/intent%3Atroubleshoot-deployment","origin":"api","parameters":{"nodeId":"intent:troubleshoot-deployment"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:pattern:public-web-service","label":"Browse Public web service","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/pattern%3Apublic-web-service","origin":"api","parameters":{"nodeId":"pattern:public-web-service"},"requiresAuthentication":false,"requiresApproval":false}]}