Migrating 3.4.0 to 5.3.0

This was reported already, so I try to follow Zammad crashed after 3.6 update? - #15 by bastolino
followed up here: Zammad crashed after 3.6 update? #2
After changing db/migrate/20200121000001_smime_support.rb and doing the manual migrate as zammad user I get:

zammad@vmubuntu02-mb:~$ zammad run rake db:migrate --trace
Your RubyGems version (3.0.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:4: warning: already initialized constant Bundler::WINDOWS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:4: warning: previous definition of WINDOWS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:5: warning: already initialized constant Bundler::FREEBSD
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:5: warning: previous definition of FREEBSD was here
...

I’ve done a gem update --system 3.2.3 but migration is still failing:

$ zammad run rake db:migrate --trace
Your RubyGems version (3.0.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:4: warning: already initialized constant Bundler::WINDOWS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:4: warning: previous definition of WINDOWS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:5: warning: already initialized constant Bundler::FREEBSD
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:5: warning: previous definition of FREEBSD was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/constants.rb:6: warning: already initialized constant Bundler::NULL
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/constants.rb:6: warning: previous definition of NULL was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/rubygems_integration.rb:10: warning: already initialized constant Bundler::RubygemsIntegration::EXT_LOCK
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/rubygems_integration.rb:12: warning: previous definition of EXT_LOCK was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/current_ruby.rb:12: warning: already initialized constant Bundler::CurrentRuby::KNOWN_MINOR_VERSIONS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/current_ruby.rb:12: warning: previous definition of KNOWN_MINOR_VERSIONS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/current_ruby.rb:24: warning: already initialized constant Bundler::CurrentRuby::KNOWN_MAJOR_VERSIONS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/current_ruby.rb:27: warning: previous definition of KNOWN_MAJOR_VERSIONS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/current_ruby.rb:26: warning: already initialized constant Bundler::CurrentRuby::KNOWN_PLATFORMS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/current_ruby.rb:29: warning: previous definition of KNOWN_PLATFORMS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1186: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2165: warning: previous definition of S_IF_DOOR was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1444: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2461: warning: previous definition of DIRECTORY_TERM was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1499: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2569: warning: previous definition of OPT_TABLE was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1553: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2627: warning: previous definition of LOW_METHODS was here
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1560: warning: already initialized constant Bundler::FileUtils::METHODS
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/fileutils/lib/fileutils.rb:2634: warning: previous definition of METHODS was here
rake aborted!
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:9:in `status_code'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:20:in `<class:GemfileError>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:20:in `<module:Bundler>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/errors.rb:3:in `<top (required)>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler.rb:10:in `require'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler.rb:10:in `<top (required)>'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/setup.rb:6:in `require'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/bundler/setup.rb:6:in `<top (required)>'
/opt/zammad/config/boot.rb:3:in `require'
/opt/zammad/config/boot.rb:3:in `<top (required)>'
/opt/zammad/config/application.rb:1:in `require_relative'
/opt/zammad/config/application.rb:1:in `<top (required)>'
/opt/zammad/Rakefile:5:in `require_relative'
/opt/zammad/Rakefile:5:in `<top (required)>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:703:in `raw_load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:104:in `block in load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:103:in `load_rakefile'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:82:in `block in run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/opt/zammad/vendor/bundle/ruby/2.6.0/bin/rake:23:in `load'
/opt/zammad/vendor/bundle/ruby/2.6.0/bin/rake:23:in `<top (required)>'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli/exec.rb:58:in `load'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli/exec.rb:23:in `run'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli.rb:491:in `exec'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli.rb:34:in `dispatch'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/cli.rb:28:in `start'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/exe/bundle:45:in `block in <top (required)>'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/usr/share/rvm/gems/ruby-3.0.4/gems/bundler-2.4.5/exe/bundle:33:in `<top (required)>'
bin/bundle:3:in `load'
bin/bundle:3:in `<main>'