HugoHasenbein / redmine_project_themes

Redmine plugin for provides project specific themes
https://www.redmine.org/plugins/redmine_project_theme
GNU General Public License v2.0
7 stars 3 forks source link

Redmine >= 5 compatibility #8

Open imThief opened 2 years ago

imThief commented 2 years ago

Hi there.

Looks like plugin is incompatible with Redmine version 5 and above, trying to install - getting this

bundle exec rake redmine:plugins:migrate RAILS_ENV=production NAME=redmine_project_themes

(in /opt/redmine)
rake aborted!
LoadError: cannot load such file -- redmine_project_themes
/var/lib/gems/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/var/lib/gems/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/opt/redmine/plugins/redmine_project_themes/init.rb:67:in `<top (required)>'
/opt/redmine/lib/redmine/plugin_loader.rb:31:in `load'
/opt/redmine/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/opt/redmine/lib/redmine/plugin_loader.rb:108:in `each'
/opt/redmine/lib/redmine/plugin_loader.rb:108:in `block in load'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `instance_exec'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `catch'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:603:in `block in default_terminator'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:199:in `block in halting'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `block in invoke_before'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `each'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:512:in `invoke_before'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:105:in `run_callbacks'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/reloader.rb:88:in `prepare!'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:391:in `initialize!'
/opt/redmine/config/environment.rb:16:in `<top (required)>'
/var/lib/gems/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/var/lib/gems/2.7.0/gems/zeitwerk-2.6.0/lib/zeitwerk/kernel.rb:35:in `require'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `block in require'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:332:in `require'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:367:in `require_environment!'
/var/lib/gems/2.7.0/gems/railties-6.1.6/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/var/lib/gems/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
AndreySolod commented 1 year ago

Hi, I use Ruby 3.0.4, and I have no this problem. Maybe you need to change (try to do this): require_relative 'lib/redmine_project_themes' (on file init.rb) to require_dependency File.expand_path('../lib/redmine_project_themes', __FILE__)