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

Compatibility for Redmine v4.x #51

Closed
withanhdammit opened this issue Feb 14, 2023 · 1 comment
Closed

Compatibility for Redmine v4.x #51

withanhdammit opened this issue Feb 14, 2023 · 1 comment

Comments

@withanhdammit
Copy link

Have tested installing on Redmine 4.x

Environment:
  Redmine version                4.2.9.stable
  Ruby version                   2.7.4-p191 (2021-07-07) [x86_64-linux-gnu]
  Rails version                  5.2.8.1
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.30.2
  Filesystem                     
Redmine plugins:
  redcase                        1.0
  redmine_agile                  1.4.12
  redmine_auto_assign_group      0.1.2

'bundle exec rake redmine:plugins:migrate RAILS_ENV=production' results in:

(in /opt/redmine)
rake aborted!
NoMethodError: undefined method `to_prepare' for ActionDispatch::Callbacks:Class
Did you mean?  to_param
/opt/redmine/plugins/redmine_my_page/init.rb:7:in `<top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine/lib/redmine/plugin.rb:187:in `block in load'
/opt/redmine/lib/redmine/plugin.rb:178:in `each'
/opt/redmine/lib/redmine/plugin.rb:178:in `load'
/opt/redmine/config/initializers/30-redmine.rb:20:in `<top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:285:in `load'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:285:in `block in load'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:285:in `load'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/engine.rb:663:in `block in load_config_initializer'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/notifications.rb:170:in `instrument'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/engine.rb:662:in `load_config_initializer'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/engine.rb:619:in `each'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/engine.rb:619:in `block in <class:Engine>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `instance_exec'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `run'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:50:in `each'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:50:in `tsort_each_child'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:60:in `run_initializers'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application.rb:361:in `initialize!'
/opt/redmine/config/environment.rb:16:in `<top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application.rb:337:in `require_environment!'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment

This led me to https://www.redmine.org/boards/2/topics/60045, where I tried the fix described in https://www.redmine.org/boards/2/topics/60045?r=60157#message-60157

Which resulted in:

(in /opt/redmine)
rake aborted!
NoMethodError: undefined method `alias_method_chain' for ActivitiesController:Class
Did you mean?  alias_method
/opt/redmine/plugins/redmine_my_page/lib/my_page_patches/activities_controller_patch.rb:11:in `block in included'
/opt/redmine/plugins/redmine_my_page/lib/my_page_patches/activities_controller_patch.rb:7:in `class_eval'
/opt/redmine/plugins/redmine_my_page/lib/my_page_patches/activities_controller_patch.rb:7:in `included'
/opt/redmine/plugins/redmine_my_page/init.rb:22:in `include'
/opt/redmine/plugins/redmine_my_page/init.rb:22:in `block (2 levels) in <top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:426:in `instance_exec'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:605:in `catch'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:199:in `block in halting'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:513:in `each'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:513:in `invoke_before'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/callbacks.rb:131:in `run_callbacks'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/reloader.rb:89:in `prepare!'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `instance_exec'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:32:in `run'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/initializable.rb:60:in `run_initializers'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application.rb:361:in `initialize!'
/opt/redmine/config/environment.rb:16:in `<top (required)>'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `block in require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.8.1/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application.rb:337:in `require_environment!'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/railties-5.2.8.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/opt/redmine/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment

Which led me to https://www.justinweiss.com/articles/rails-5-module-number-prepend-and-the-end-of-alias-method-chain/, but that's way over my head.

Hoping this plugin can be updated to work with Redmine 4.x+

@withanhdammit
Copy link
Author

Apparently, I am an idiot. I must have had an old version cached locally because I just downloaded a fresh copy from here and it installed and worked great.

Issue resolved.

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

1 participant