ixti / redmine_tags

Redmine plugin, that adds issues tagging support
GNU General Public License v3.0
196 stars 119 forks source link

Redmine 4.0 compatibility #206

Closed dktcoding closed 5 years ago

dktcoding commented 5 years ago

Hi, I'm testing the latest Redmine version, and found that redmine_tagsupgrade fails:

rake redmine:plugins:migrate NAME=redmine_tags RAILS_ENV=production
(in /home/redmine/redmine-4.0.0)
rake aborted!
ArgumentError: A class was passed to `:class_name` but we are expecting a string.
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/reflection.rb:436:in `initialize'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/reflection.rb:31:in `new'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/reflection.rb:31:in `create'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/associations/builder/association.rb:45:in `create_reflection'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/associations/builder/association.rb:31:in `build'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/associations.rb:1369:in `has_many'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable/core.rb:26:in `block (2 levels) in initialize_acts_as_taggable_on_core'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable/core.rb:23:in `class_eval'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable/core.rb:23:in `block in initialize_acts_as_taggable_on_core'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable/core.rb:17:in `each'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable/core.rb:17:in `initialize_acts_as_taggable_on_core'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable/core.rb:11:in `included'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable.rb:94:in `include'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable.rb:94:in `taggable_on'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable.rb:54:in `acts_as_ordered_taggable_on'
/var/lib/gems/2.5.0/gems/acts-as-taggable-on-4.0.0/lib/acts_as_taggable_on/taggable.rb:27:in `acts_as_ordered_taggable'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb:8:in `block in included'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb:7:in `class_eval'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb:7:in `included'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb:102:in `include'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb:102:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:378:in `block in require_or_load'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:37:in `block in load_interlock'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:13:in `loading'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:37:in `load_interlock'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:356:in `require_or_load'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:334:in `depend_on'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:246:in `require_dependency'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/init.rb:8:in `block (2 levels) in <top (required)>'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/init.rb:7:in `each'
/home/redmine/redmine-4.0.0/plugins/redmine_tags/init.rb:7:in `block in <top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `instance_exec'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/reloader.rb:89:in `prepare!'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application/finisher.rb:63:in `block in <module:Finisher>'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
/home/redmine/redmine-4.0.0/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:337:in `require'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:337:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
marius-balteanu commented 5 years ago

Did you run bundle install/bundle update?

dktcoding commented 5 years ago

Yes,

And also tried:

Since redmine_tags is the only plugin essential for our workflow we decided to upgrade to 3.4.7 and postpone a bit the 4.0.0 upgrade, so I'll give it another try next weekend.

Looking forward to seeing this in Redmine core! (I can't believe it's not yet included given that is by far the most useful).

Regards and thanks for this amazing plugin!

marius-balteanu commented 5 years ago

Sorry, but I'm not able to reproduce.

I tried two scenarios:

  1. Fresh install
  2. Setup a 3.4.7 instance with redmine_tags at 3.2.2, create some issues with tags and after that update Redmine and redmine_tags to 4.0.0. Both worked as expected.

When you have time to try again the update, please let me know your version of acts-as-taggable-on from Gemfile.lock. bundle update should bring version 6.0.0 which is the only one compatible with the latest Rails.

dktcoding commented 5 years ago

I started the whole process from zero (a couple of times) just leaving the redmine_tags plugin, and everything was updated without problem.

Unfortunately I can't pinpoint the error, but at least is working!

Thanks for the help!

marius-balteanu commented 5 years ago

Thanks @dktcoding for your feedback.

KaosKeith commented 5 years ago

I came across the same error was able to fix this issue by forcing the acts-as-taggable-on gem to version 5.0. i got the error using acts-as-taggable-on 4.0