Redmine App: How to install plugins?

What app is this about, and its version: Redmine 6.1.2~ynh1
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Virtual machine

Describe your issue

I tried to follow the guide in

As root I copied the plugins to /var/www/redmine/plugins.

After changing to /var/www/redmine I ran the command:

bundle exec rake redmine:plugins:migrate RAILS_ENV=production

I got following messages and errors:

/usr/lib/ruby/vendor_ruby/rubygems/resolver/conflict.rb:47:in `conflicting_dependencies': undefined method `request' for nil:NilClass (NoMethodError)

[@failed_dep.dependency, @activated.request.dependency]
                                   ^^^^^^^^
from /usr/lib/ruby/vendor_ruby/rubygems/exceptions.rb:61:in `conflicting_dependencies'
from /usr/lib/ruby/vendor_ruby/rubygems/exceptions.rb:55:in `initialize'
from /usr/lib/ruby/vendor_ruby/rubygems/resolver.rb:193:in `exception'
from /usr/lib/ruby/vendor_ruby/rubygems/resolver.rb:193:in `raise'
from /usr/lib/ruby/vendor_ruby/rubygems/resolver.rb:193:in `rescue in resolve'
from /usr/lib/ruby/vendor_ruby/rubygems/resolver.rb:191:in `resolve'
from /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:411:in `resolve'
from /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:423:in `resolve_current'
from /usr/lib/ruby/vendor_ruby/rubygems.rb:230:in `finish_resolve'
from /usr/lib/ruby/vendor_ruby/rubygems.rb:287:in `block in activate_bin_path'
from /usr/lib/ruby/vendor_ruby/rubygems.rb:285:in `synchronize'
from /usr/lib/ruby/vendor_ruby/rubygems.rb:285:in `activate_bin_path'
from /usr/local/bin/bundle:25:in `<main>'```

/usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:317:in `raise_error_unless_state': Unable to satisfy the following requirements: (Gem::Resolver::Molinillo::VersionConflict)

`bundler (= 4.0.10)` required by `user-specified dependency`
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
	from <internal:kernel>:90:in `tap'
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:254:in `process_topmost_state'
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:182:in `resolve'
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
	from /usr/lib/ruby/vendor_ruby/rubygems/resolver.rb:190:in `resolve'
	from /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:411:in `resolve'
	from /usr/lib/ruby/vendor_ruby/rubygems/request_set.rb:423:in `resolve_current'
	from /usr/lib/ruby/vendor_ruby/rubygems.rb:230:in `finish_resolve'
	from /usr/lib/ruby/vendor_ruby/rubygems.rb:287:in `block in activate_bin_path'
	from /usr/lib/ruby/vendor_ruby/rubygems.rb:285:in `synchronize'
	from /usr/lib/ruby/vendor_ruby/rubygems.rb:285:in `activate_bin_path'
	from /usr/local/bin/bundle:25:in `<main>'

I restarted Redmine using Tools > Services > redmine but that didn’t work. When I open Redmine, I get a “502 Bad Gateway” message.

So, how can I successfully install Redmine plugins?

Share relevant logs or error messages