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:

Representative Queries

Prerequisites

Workflow Steps

  1. 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.
  2. Read the Build Log:
    • The last lines name the failing command and its output.
    • Command: ample logs --kind build
  3. Read the Runtime Log:
    • For health_check_failed the runtime log carries the Rails process output.
    • Command: ample logs --kind runtime
  4. Fix and Redeploy Once:
    • Change the source, the environment or the command override, then run ample deploy again.
  5. Verify:
    • Fetch the live URL on the example; on failure read the build and runtime logs.
    • Command: ample logs --kind build

Limitations

Cost Estimate

Next Actions