Ruby on rails 将数据迁移到新实例后出现Redmine 500错误3.2->;4

Ruby on rails 将数据迁移到新实例后出现Redmine 500错误3.2->;4,ruby-on-rails,ruby,redmine,ubuntu-20.04,Ruby On Rails,Ruby,Redmine,Ubuntu 20.04,我正在尝试将数据从旧的redmine(3.2)实例迁移到新的redmine(4.0) 我的新redmine服务器运行Ubuntu20.04,配置如下 Environment: Redmine version 4.0.6.stable Ruby version 2.7.0-p0 (2019-12-25) [x86_64-linux-gnu] Rails version 5.2.3 E

我正在尝试将数据从旧的redmine(3.2)实例迁移到新的redmine(4.0)

我的新redmine服务器运行Ubuntu20.04,配置如下

Environment:
  Redmine version                4.0.6.stable
  Ruby version                   2.7.0-p0 (2019-12-25) [x86_64-linux-gnu]
  Rails version                  5.2.3
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.25.1
  Filesystem                     
Redmine plugins:
  no plugin installed
我跟着创造了它

在移动数据库之后,我运行了
RAILS\u ENV=production bundle exec rake db:migrate
,以执行任何必要的迁移,这些迁移似乎成功地执行了,尽管它确实报告了一些警告()-我不确定它们是否相关,因为我对ruby了解不多

我可以看到我所有的旧票都在那里等,但当我试图查看一个或创建一个新的,它抛出一个500,报告到日志如下

Completed 500 Internal Server Error in 205ms (ActiveRecord: 21.3ms)

ActionView::Template::Error (undefined method `accessor' for #<ActiveModel::Type::Value:0x00005625fa76b6c0>):
    15: <% end %>
    16:
    17: <% if @issue.safe_attribute? 'assigned_to_id' %>
    18: <p><%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true, :required => @issue.required_attribute?('assigned_to_id') %></p>
    19: <% end %>
    20:
    21: <% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>

app/models/role.rb:223:in `permissions_all_trackers'
app/models/role.rb:232:in `permissions_all_trackers?'
app/models/role.rb:238:in `permissions_tracker?'
app/models/project.rb:554:in `block in assignable_users'
app/models/project.rb:554:in `assignable_users'
app/models/issue.rb:934:in `assignable_users'
app/views/issues/_attributes.html.erb:18:in `block in _app_views_issues__attributes_html_erb___775154800353400985_73440'
app/helpers/application_helper.rb:1249:in `labelled_fields_for'
app/views/issues/_attributes.html.erb:1:in `_app_views_issues__attributes_html_erb___775154800353400985_73440'
app/views/issues/_form.html.erb:44:in `block in _app_views_issues__form_html_erb___962050841117096496_73420'
app/helpers/application_helper.rb:1249:in `labelled_fields_for'
app/views/issues/_form.html.erb:1:in `_app_views_issues__form_html_erb___962050841117096496_73420'
app/views/issues/_edit.html.erb:8:in `block in _app_views_issues__edit_html_erb___2491441640301013004_73400'
app/helpers/application_helper.rb:1242:in `labelled_form_for'
app/views/issues/_edit.html.erb:1:in `_app_views_issues__edit_html_erb___2491441640301013004_73400'
app/views/issues/_action_menu_edit.html.erb:8:in `_app_views_issues__action_menu_edit_html_erb__2036666379799696235_73380'
app/views/issues/show.html.erb:139:in `_app_views_issues_show_html_erb___1022264146824026390_73240'
app/controllers/issues_controller.rb:107:in `block (2 levels) in show'
app/controllers/issues_controller.rb:100:in `show'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

任何指点都值得欣赏。

这似乎很有意义:还有这一点:是的,这两个我都看过。第一个似乎正是我的问题,但没有给出解决方案,第二个似乎是在完全不同的背景下出现的相同错误,没有可靠的解决方案(我可以用我极其有限的ruby知识理解),你不应该使用这种混合的
ruby
Redmine
版本。看见
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/associations.rb:1855: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/associations.rb:1368: warning: The called method `has_many' is defined here
/usr/share/rubygems-integration/all/gems/actionpack-5.2.3/lib/action_dispatch/middleware/stack.rb:37: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/actionpack-5.2.3/lib/action_dispatch/middleware/static.rb:111: warning: The called method `initialize' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/database_statements.rb:12: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:95: warning: The called method `select_all' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/transactions.rb:212: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:260: warning: The called method `transaction' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:171: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:97: warning: The called method `initialize' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/persistence.rb:705: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/timestamp.rb:105: warning: The called method `_update_record' is defined here
/usr/share/rubygems-integration/all/gems/activemodel-5.2.3/lib/active_model/type/integer.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activemodel-5.2.3/lib/active_model/type/value.rb:8: warning: The called method `initialize' is defined here
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql/schema_statements.rb:44: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/share/rubygems-integration/all/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/schema_definitions.rb:11: warning: The called method `initialize' is defined here