Multisite rebuild fails on AlmaLinux 9.2, works on AlmaLinux 8.8

AI-generated summary

The user MikeNolan reports that a multisite rebuild fails on AlmaLinux 9.2 but works on AlmaLinux 8.8, with a TypeError: no implicit conversion of Symbol into Integer in the log. supermathie suggests checking the multisite.yml configuration, as the host version shouldn’t affect the issue. MikeNolan resolves the problem by updating the app.yml file to match the testbed server’s configuration, which allows the build to succeed.

I’ve been testing a multisite version (splitting two forums into separate databases) on my testbed server and it works great there (AlmaLinux 8.8.)

But when I try it on AlmaLinux 9.2 on my production server, the rebuild fails.

Some excerpts from the log:

I, [2023-08-18T22:33:25.200147 #1]  INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate
rake aborted!
TypeError: no implicit conversion of Symbol into Integer
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:183:in `[]='
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:183:in `block in load_config!'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:181:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:181:in `load_config!'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:173:in `initialize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:40:in `new'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:40:in `config_filename='
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rails_multisite-5.0.0/lib/rails_multisite/railtie.rb:19:in `block in <class:Railtie>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:372:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate failed with return #<Process::Status: pid 884 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params "cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate"
bootstrap failed with exit code 1

Any suggestions?

Your host version should not be making any difference here.

I would start with going over your multisite.yml with a fine comb and ensuring it’s the same in both places.

I thought I had updated the app.yml file to match the changes I made on the testbed server, but apparently not. When I copied that app.yml file over and changed the domain information, the app built successfully. Still a few other issues to deal with, but they’re not Discourse issues.