Project

General

Profile

after update from 3.4 to 4.0 plugins didnt work

Added by Stanislav Khudyakov over 5 years ago

Hello. I'm update redmine. Redmine work on mysql apache2 + i'm install rvm and passanegr for ruby, after it redmine run good, but when i'm try copy old plugins or install new, i'm recive error, and redmine begins to fall.

if i'm try

redmine@srv-redmine:/opt/redmine-4.0.0$ rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreateThemeChangerUserSettings < ActiveRecord::Migration[4.2]
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:528:in `inherited'
/opt/redmine-4.0.0/plugins/redmine_theme_changer/db/migrate/0001_create_theme_changer_user_settings.rb:18:in `&lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:986:in `load_migration'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:982:in `migration'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `disable_ddl_transaction'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1350:in `use_transaction?'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1342:in `ddl_transaction'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:498:in `up'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:530:in `migrate_plugin'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:471:in `migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:485:in `block in migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:484:in `each'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:484:in `migrate'
/opt/redmine-4.0.0/lib/tasks/redmine.rake:135:in `block (3 levels) in &lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `&lt;main&gt;'
Caused by:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreateThemeChangerUserSettings < ActiveRecord::Migration[4.2]
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:528:in `inherited'
/opt/redmine-4.0.0/plugins/redmine_theme_changer/db/migrate/0001_create_theme_changer_user_settings.rb:18:in `&lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:986:in `load_migration'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:982:in `migration'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `disable_ddl_transaction'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1350:in `use_transaction?'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1342:in `ddl_transaction'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:498:in `up'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:530:in `migrate_plugin'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:471:in `migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:485:in `block in migrate'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:484:in `each'
/opt/redmine-4.0.0/lib/redmine/plugin.rb:484:in `migrate'
/opt/redmine-4.0.0/lib/tasks/redmine.rake:135:in `block (3 levels) in &lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `&lt;main&gt;'
Tasks: TOP => redmine:plugins:migrate

after apache restart site is downed.

if i'm trying to copy plugin from old version of redmine

cp -rp /opt/redmine-3.2.0/plugins/redmine_issue_checklist/ /opt/redmine-4.0.0/plugins/

Error:

redmine@srv-redmine:/opt/redmine-4.0.0$ rake redmine:plugins:migrate NAME=redmine_issue_checklist RAILS_ENV=production
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/init.rb:24: warning: key :issue_checklist is duplicated and overwritten on line 24
rake aborted!
NoMethodError: undefined method `alias_method_chain' for Issue (call 'Issue.connection' to establish a connection):Class
Did you mean? alias_method
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.2/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/lib/redmine_issue_checklist/patches/issue_patch.rb:11:in `block in included'
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/lib/redmine_issue_checklist/patches/issue_patch.rb:10:in `class_eval'
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/lib/redmine_issue_checklist/patches/issue_patch.rb:10:in `included'
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/lib/redmine_issue_checklist/patches/issue_patch.rb:58:in `include'
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/lib/redmine_issue_checklist/patches/issue_patch.rb:58:in `&lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/opt/redmine-4.0.0/plugins/redmine_issue_checklist/lib/redmine_issue_checklist/redmine_issue_checklist.rb:5:in `block in &lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `instance_exec'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.2/lib/active_support/reloader.rb:89:in `prepare!'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application/finisher.rb:63:in `block in &lt;module:Finisher&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
/opt/redmine-4.0.0/config/environment.rb:14:in `&lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:337:in `require'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:337:in `require_environment!'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `&lt;main&gt;'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

Please help me understend, hot to make it work.
Thanks


Replies (4)

RE: after update from 3.4 to 4.0 plugins didnt work - Added by Stanislav Khudyakov over 5 years ago

After i'm change rails version in Gemfile to 4.2, and did bundle update & install i'm recive this error

redmine@srv-redmine:/opt/redmine-4.0.0$ rake redmine:plugins:migrate NAME=redmine_issue_cheklist RAILS_ENV=production
rake aborted!
NoMethodError: undefined method `represent_boolean_as_integer=' for nil:NilClass
/opt/redmine-4.0.0/config/application.rb:51:in `&lt;class:Application&gt;'
/opt/redmine-4.0.0/config/application.rb:8:in `&lt;module:RedmineApp&gt;'
/opt/redmine-4.0.0/config/application.rb:7:in `&lt;top (required)&gt;'
/opt/redmine-4.0.0/Rakefile:5:in `require'
/opt/redmine-4.0.0/Rakefile:5:in `&lt;top (required)&gt;'
/opt/redmine-4.0.0/vendor/bundle/ruby/2.5.0/gems/rake-12.3.2/exe/rake:27:in `&lt;top (required)&gt;'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
/home/redmine/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `&lt;main&gt;'
(See full trace by running task with --trace)

RE: after update from 3.4 to 4.0 plugins didnt work - Added by Go MAEDA over 5 years ago

Many plugins for 3.4 does not work on Redmine 4.0 unless authors update their plugin for Redmine 4.0. There is no quick hack to make those plugins work on Redmine 4.0.

Please stay in 3.4 until they release plugins for 4.0.

RE: after update from 3.4 to 4.0 plugins didnt work - Added by Stanislav Khudyakov over 5 years ago

But, redmine 4.0 work only with rails 5.2 ......

RE: after update from 3.4 to 4.0 plugins didnt work - Added by Stanislav Khudyakov over 5 years ago

thank you, all problem in old version of plugins =)

    (1-4/4)