docker-redmine icon indicating copy to clipboard operation
docker-redmine copied to clipboard

5.1.1-4 dies because of Matrix in gem

Open vomus opened this issue 1 year ago • 7 comments

Hi! I just tried to run 5.1.1-4 image and it told me that I am missing matrix:

redmine-1 | LoadError: cannot load such file -- matrix (LoadError)

I googled and found that Matrix was removed from Ruby standard library since 3.1.1, so one has to manually add it. I went and created a pre-install.sh script in plugins/ with a

bundle add matrix

in it. But it all blew into my face with

redmine-1 | [!] There was an error parsing injected gems: You cannot specify the same gem twice with different version requirements. redmine-1 | You specified: matrix (~> 0.4.2) and matrix (>= 0). Gem already added. Bundler cannot continue. redmine-1 | redmine-1 | # from injected gems:1 redmine-1 | # ------------------------------------------- redmine-1 | > gem "matrix", ">= 0" redmine-1 | # ------------------------------------------- redmine-1 exited with code 4

So it seems that Matrix is already there?

vomus avatar Feb 13 '24 20:02 vomus

What plugin is requiring this?

jcormier avatar Feb 13 '24 20:02 jcormier

What plugin is requiring this?

Hm... I do not know. At least

find . -name Gemfile -exec grep -i 'matrix' {} +

in plugins/ returns nothing

vomus avatar Feb 13 '24 20:02 vomus

A full stack trace

redmine-1  | LoadError: cannot load such file -- matrix (LoadError)
redmine-1  | :38:in `require'
redmine-1  | :38:in `require'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies.rb:332:in `block in require'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies.rb:299:in `load_dependency'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/activesupport-6.1.7.6/lib/active_support/dependencies.rb:332:in `require'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `require_relative'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
redmine-1  | /home/redmine/data/tmp/bundle/ruby/3.2.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
redmine-1  | /usr/local/bundle/gems/bundler-2.4.22/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
redmine-1  | /usr/local/bundle/gems/bundler-2.4.22/lib/bundler/runtime.rb:55:in `each'

vomus avatar Feb 13 '24 20:02 vomus

These seem to be coming from all the RedmineUP and Redmine-X plugins:

./plugins/redmine_x_lightbox2/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_resources/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_agile/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_contacts_invoices/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_contacts/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_checklists/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_x_gantt/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_x_agile_my_page/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_reporter/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_budgets/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_x_project_templates/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmine_webhook/lib/redmine_webhook.rb:unless Rails.try(:autoloaders).try(:zeitwerk_enabled?)
./plugins/redmine_webhook/init.rb:if Rails.try(:autoloaders).try(:zeitwerk_enabled?)
./plugins/redmine_x_assets/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk
./plugins/redmineup_tags/init.rb:if Rails.configuration.respond_to?(:autoloader) && Rails.configuration.autoloader == :zeitwerk

vomus avatar Feb 13 '24 20:02 vomus

I would guess that you may need to update those plugins

jcormier avatar Feb 13 '24 20:02 jcormier

I would guess that you may need to update those plugins

They are of the latest versions that are written to support 5.1.x :-)

vomus avatar Feb 13 '24 20:02 vomus

Then I'd guess they don't support ruby 3.2 yet. You can go back to 5.1.1-3. Though may be a good idea to contact them and ask them about ruby 3.2 support.

jcormier avatar Feb 13 '24 20:02 jcormier