Rails deploy fails

Hi

Does anyone know what’s going on here?

2022-12-09T09:02:35Z [info]rails aborted!
2022-12-09T09:02:35Z [info]Command failed with status (1): [bin/rails server…]
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/file_utils.rb:67:in block in create_shell_runner' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/file_utils.rb:57:in sh’
2022-12-09T09:02:35Z [info]/app/lib/tasks/fly.rake:21:in block (2 levels) in <main>' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in block in execute’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in each' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in execute’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in synchronize’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in invoke’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block (2 levels) in top_level’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in each' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block in top_level’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in top_level’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/commands/rake/rake_command.rb:24:in block (2 levels) in perform' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in standard_exception_handling’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/commands/rake/rake_command.rb:24:in block in perform' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in with_application’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/commands/rake/rake_command.rb:18:in perform' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/command.rb:51:in invoke’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/railties-7.0.3.1/lib/rails/commands.rb:18:in <main>' 2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in require’
2022-12-09T09:02:35Z [info]/app/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require’
2022-12-09T09:02:35Z [info]Tasks: TOP => fly:server
2022-12-09T09:02:35Z [info](See full trace by running task with --trace)
2022-12-09T09:02:36Z [info]Starting clean up.
→ v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1

Rails produces long stack traces. All the above says is that the server failed to start, and here is how the server was invoked. We need to see earlier in the trace. Can you start flyctl logs in one window and then try deploying again in another window?

Thanks!

Dumb me. I’m new to fly and hadn’t figured out how to use logs properly.
Now I could clearly see I had a zeitwerk issue :face_with_peeking_eye:
Thanks you for pointing me in the right direction.

1 Like