Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.1.1-4 dies because of Matrix in gem #543

Open
vomus opened this issue Feb 13, 2024 · 8 comments
Open

5.1.1-4 dies because of Matrix in gem #543

vomus opened this issue Feb 13, 2024 · 8 comments

Comments

@vomus
Copy link

vomus commented Feb 13, 2024

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?

@jcormier
Copy link
Collaborator

What plugin is requiring this?

@vomus
Copy link
Author

vomus commented Feb 13, 2024

What plugin is requiring this?

Hm... I do not know. At least

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

in plugins/ returns nothing

@vomus
Copy link
Author

vomus commented Feb 13, 2024

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
Copy link
Author

vomus commented Feb 13, 2024

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

@jcormier
Copy link
Collaborator

I would guess that you may need to update those plugins

@vomus
Copy link
Author

vomus commented Feb 13, 2024

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 :-)

@jcormier
Copy link
Collaborator

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.

@prantikk
Copy link

@vomus were you able to find a fix to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants