Hi,
On a fresh install of Redmine with the following:
Redmine version 4.0.4.stable
Ruby version 2.5.5-p157 (2019-03-15) [x86_64-linux-gnu]
Rails version 5.2.2.1
We ran into errors when running the migration command
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
First error was:
Message from application: undefined method `to_prepare' for ActionDispatch::Callbacks:Class
Did you mean? to_param (NoMethodError)
/usr/share/redmine/plugins/redmine_default_assign/init.rb:12:in `<top (required)>'
(there's probably a better way to do this using a Rails::VERSION::MAJOR check)
Second error was:
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class AddDefaultAssigneeToProject < ActiveRecord::Migration[4.2]
/usr/share/rubygems-integration/all/gems/activerecord-5.2.2.1/lib/active_record/migration.rb:528:in `inherited'
/usr/share/redmine/plugins/redmine_default_assign/db/migrate/001_add_default_assignee_to_project.rb:1:in `<top (required)>'
which was fixed by adding [5.0] in db/migrate/001_add_default_assignee_to_project.rb:
class AddDefaultAssigneeToProject < ActiveRecord::Migration[5.0]
Hi, On a fresh install of Redmine with the following:
We ran into errors when running the migration command
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
First error was:
which was fixed by replacing (in init.rb):
(there's probably a better way to do this using a Rails::VERSION::MAJOR check)
Second error was:
which was fixed by adding [5.0] in db/migrate/001_add_default_assignee_to_project.rb:
class AddDefaultAssigneeToProject < ActiveRecord::Migration[5.0]