I’m having problems when deploying my rails app. I’ve tried changing the credentials running rails secret and copying the new secret_key_base
using EDITOR=vim rails credentials:edit --environment production
but still receiving the same error of a missing secret_key_base. I have a master.key file and it hasn’t been changed.
fly logs
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/command.rb:50:in `invoke'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands.rb:18:in `<main>'
2023-04-04T16:20:17Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2023-04-04T16:20:17Z app[36cafc35] lax [info]Tasks: TOP => db:prepare => db:load_config => environment
2023-04-04T16:20:17Z app[36cafc35] lax [info](See full trace by running task with --trace)
2023-04-04T16:20:17Z app[36cafc35] lax [info]Starting clean up.
2023-04-04T16:20:23Z runner[36cafc35] lax [info]Starting instance
2023-04-04T16:20:23Z runner[36cafc35] lax [info]Configuring virtual machine
2023-04-04T16:20:23Z runner[36cafc35] lax [info]Pulling container image
2023-04-04T16:20:24Z runner[36cafc35] lax [info]Unpacking image
2023-04-04T16:20:24Z runner[36cafc35] lax [info]Preparing kernel init
2023-04-04T16:20:24Z runner[36cafc35] lax [info]Configuring firecracker
2023-04-04T16:20:24Z runner[36cafc35] lax [info]Starting virtual machine
2023-04-04T16:20:25Z app[36cafc35] lax [info]Starting init (commit: 9e69c24)...
2023-04-04T16:20:25Z app[36cafc35] lax [info]Preparing to run: `/rails/bin/docker-entrypoint ./bin/rails server` as rails
2023-04-04T16:20:25Z app[36cafc35] lax [info]2023/04/04 16:20:25 listening on [fdaa:1:8854:a7b:112:36ca:fc35:2]:22 (DNS: [fdaa::3]:53)
2023-04-04T16:20:26Z app[36cafc35] lax [info]rails aborted!
2023-04-04T16:20:26Z app[36cafc35] lax [info]ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit`
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:603:in `validate_secret_key_base'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:437:in `secret_key_base'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:177:in `key_generator'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:201:in `message_verifier'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activestorage-6.1.6/lib/active_storage/engine.rb:127:in `block (2 levels) in <class:Engine>'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/lazy_load_hooks.rb:51:in `each'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application/finisher.rb:140:in `block in <module:Finisher>'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:60:in `run_initializers'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:391:in `initialize!'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/config/environment.rb:5:in `<main>'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `block in require'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `require'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:367:in `require_environment!'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:533:in `block in run_tasks_blocks'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands/rake/rake_command.rb:18:in `perform'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/command.rb:50:in `invoke'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/railties-6.1.6/lib/rails/commands.rb:18:in `<main>'
2023-04-04T16:20:26Z app[36cafc35] lax [info]/rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
2023-04-04T16:20:26Z app[36cafc35] lax [info]Tasks: TOP => db:prepare => db:load_config => environment
2023-04-04T16:20:26Z app[36cafc35] lax [info](See full trace by running task with --trace)
2023-04-04T16:20:27Z app[36cafc35] lax [info]Starting clean up.
2023-04-04T16:20:28Z health[36cafc35] lax [error]Health check on port 3000 has failed. Your app is not responding properly. Services exposed on ports [80, 443] will have intermittent failures until the health check passes.