Project

General

Profile

Cannot migrate from Redmine 4.1.1 to 5.1.2

Added by Jan Gardian 6 months ago

Hello we have currently installed Redmine 4.1.1 at Ubuntu 20.04.6 and I installed Redmine 5.1.2 at separate server Ubuntu 22.04.4. I have followed https://www.redmine.org/projects/redmine/wiki/RedmineUpgrade. We created database backup from 4.1.1 installation and restored to database server used by 5.1.2 installation.

To new redmine installation directory I only copied `plugins` directory, config/database.yml and configuration.yml files from redmine 4.1.1 installation.
When I run command `bundle exec rake db:migrate RAILS_ENV=production --trace` fron "Step 4 - Update the database" I always get bellow message:
```
root@redmine-v2:/opt/redmine# bundle exec rake db:migrate RAILS_ENV=production --trace
  • Invoke db:migrate (first_time)
  • Invoke db:load_config (first_time)
  • Invoke environment (first_time)
  • Execute environment
    rake aborted!
    LoadError: cannot load such file -- redmine_agile
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
    /opt/redmine/plugins/redmine_agile/init.rb:71: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'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:427:in `instance_exec'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:427:in `block in make_lambda'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:603:in `catch'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:603:in `block in default_terminator'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:199:in `block in halting'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:512:in `block in invoke_before'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:512:in `each'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:512:in `invoke_before'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/callbacks.rb:105:in `run_callbacks'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/reloader.rb:88:in `prepare!'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/initializable.rb:32:in `instance_exec'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/initializable.rb:32:in `run'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/initializable.rb:61:in `block in run_initializers'
    /usr/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
    /usr/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    /usr/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
    /usr/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
    /usr/lib/ruby/3.0.0/tsort.rb:347:in `each'
    /usr/lib/ruby/3.0.0/tsort.rb:347:in `call'
    /usr/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
    /usr/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
    /usr/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/initializable.rb:60:in `run_initializers'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/application.rb:391:in `initialize!'
    /opt/redmine/config/environment.rb:16:in `<top (required)>'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/dependencies.rb:332:in `block in require'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/dependencies.rb:299:in `load_dependency'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.7/lib/active_support/dependencies.rb:332:in `require'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/application.rb:367:in `require_environment!'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:243:in `block in invoke_prerequisites'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `each'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `invoke_prerequisites'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:243:in `block in invoke_prerequisites'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `each'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:241:in `invoke_prerequisites'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:83:in `block in run'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/lib/rake/application.rb:80:in `run'
    /opt/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
    /opt/redmine/vendor/bundle/ruby/3.0.0/bin/rake:25:in `load'
    /opt/redmine/vendor/bundle/ruby/3.0.0/bin/rake:25:in `<main>'
    Tasks: TOP => db:migrate => db:load_config => environment
    ```

Could you please give me advise how to migrate data including plugins from 4.1.1 version to 5.1.2?

Redmine version data:
Environment:
Redmine version 4.1.1.stable
Ruby version 2.7.0-p0 (2019-12-25) [x86_64-linux-gnu]
Rails version 5.2.4.2
Environment production
Database adapter PostgreSQL
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Git 2.25.1
Filesystem
Redmine plugins:
redmine_agile 1.5.4
redmine_checklists 3.1.18
redmine_ckeditor 1.2.3
redmine_issue_dynamic_edit 0.7.2
redmine_issue_templates 0.3.8
redmine_knowledgebase 4.1.1
redmine_markdown_task_list 1.0.2
redmine_per_project_formatting 0.1.0
redmine_reformat 0.7.0-pre
redmine_subtasks_inherited_fields 1.1.1
redmineup_tags 2.0.8
scrum 0.20.0


Replies (1)

RE: Cannot migrate from Redmine 4.1.1 to 5.1.2 - Added by David from RedminePRO.com 6 months ago

You need to check for the updated version of each plugin and replace it in the plugin folder.

-- David https://redminepro.com/

    (1-1/1)