You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A little background here, I'm running Samson in Kubernetes, and every so often update the version of Samson and usually log into the pod after upgrading to run migrations. This has worked for the past few years without much issue. All the environment variables are correctly configured, and Samson has been working great.
However, after upgrading from v2784 (old I know 🤦♂) to v3071, I tried running bin/rake db:migrate and was met with the following error:
user@samson:/app# bin/rake db:migrate
rake aborted!
Database URL cannot be empty
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/connection_adapters/connection_specification.rb:39:in `initialize'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations/url_config.rb:64:in `new'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations/url_config.rb:64:in `build_url_hash'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations/url_config.rb:69:in `build_config'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations/url_config.rb:36:in `initialize'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:172:in `new'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:172:in `build_db_config_from_hash'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:150:in `build_db_config_from_raw_config'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:126:in `block in build_configs'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:122:in `each'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:122:in `flat_map'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:122:in `build_configs'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/database_configurations.rb:18:in `initialize'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/tasks/database_tasks.rb:159:in `new'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/tasks/database_tasks.rb:159:in `for_each'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/railties/databases.rake:28:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/railties/databases.rake:23:in `block in <top (required)>'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/railties/databases.rake:7:in `<top (required)>'
/usr/local/bundle/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:319:in `load'
/usr/local/bundle/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:319:in `block in load'
/usr/local/bundle/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/usr/local/bundle/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:319:in `load'
/usr/local/bundle/gems/activerecord-6.0.1/lib/active_record/railtie.rb:49:in `block in <class:Railtie>'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:246:in `instance_exec'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:246:in `block in run_tasks_blocks'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:255:in `each'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:255:in `each_registered_block'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:246:in `run_tasks_blocks'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/application.rb:509:in `block in run_tasks_blocks'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/engine/railties.rb:15:in `each'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/engine/railties.rb:15:in `each'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/application.rb:509:in `run_tasks_blocks'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/engine.rb:459:in `load_tasks'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `public_send'
/usr/local/bundle/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `method_missing'
/app/Rakefile:11:in `<top (required)>'
(See full trace by running task with --trace)
Looking through releases I can see that in v3052 rails was updated to v6. Running the same migrate command in version v3051, the database is migrated, all is hunky-dory. No errors 👍
Apologies, but I don't really know too much about rails, but some Googling brings up this issue rails/rails#36610 – could this be related?
A little background here, I'm running Samson in Kubernetes, and every so often update the version of Samson and usually log into the pod after upgrading to run migrations. This has worked for the past few years without much issue. All the environment variables are correctly configured, and Samson has been working great.
However, after upgrading from
v2784(old I know 🤦♂) tov3071, I tried runningbin/rake db:migrateand was met with the following error:Looking through releases I can see that in
v3052rails was updated to v6. Running the same migrate command in versionv3051, the database is migrated, all is hunky-dory. No errors 👍Apologies, but I don't really know too much about rails, but some Googling brings up this issue rails/rails#36610 – could this be related?