rake aborted plugin for redmine

742 Views Asked by At

I am trying to install a plugin for redmine version 5.0.1 an error occurs during the installation process, while if installed on redmine version 4.2.6, the plugin is installed correctly. What could be the problem

this plugin https://github.com/credativUK/redmine_email_inline_images

error

WARN -- : Creating scope :system. Overwriting existing method Enumeration.system.
rake aborted!
LoadError: cannot load such file -- redmine_email_inline_images/mail_handler_patch
/usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/src/redmine/plugins/redmine_email_inline_images/init.rb:2:in `<top (required)>'
/usr/src/redmine/lib/redmine/plugin_loader.rb:31:in `load'
/usr/src/redmine/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/usr/src/redmine/lib/redmine/plugin_loader.rb:108:in `each'
/usr/src/redmine/lib/redmine/plugin_loader.rb:108:in `block in load'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in   `instance_exec'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `catch'   
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `block in default_terminator'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:199:in `block in halting'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `block in invoke_before'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `each'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `invoke_before'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:105:in `run_callbacks'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/reloader.rb:88:in `prepare!'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'    
/usr/local/bundle/gems/railties-6.1.6/lib/rails/initializable.rb:60:in `run_initializers'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/application.rb:391:in `initialize!'
/usr/src/redmine/config/environment.rb:16:in `<top (required)>'
/usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
 /usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `block in require'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/bundle/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `require'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/application.rb:367:in `require_environment!'
/usr/local/bundle/gems/railties-6.1.6/lib/rails/application.rb:533:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment

install command rake db:migrate_plugins RAILS_ENV=production

1

There are 1 best solutions below

0
Guss On

Due to the upgrade to Rails 6.1 and their zeitwerk autoloader, plugins not written specifically for Redmine 5.0 (or upgraded with the required compatibility changes) will not work with Redmine 5.

The best article I could find for updating your plugins to Redmine 5 is here and unfortunately is is both in Japanese (I used Google translate) as well as does not cover how to upgrade things that a lot of projects need, such as database migration and hook loading.