Project

General

Profile

500 Error after migrating data to new instance 3.2 -> 4.0

Added by Nate Green over 3 years ago

I'm trying to migrate my data from an older instance of redmine (3.2) to a new one (4.0).

My new redmine server runs ubuntu 20.04 and is configured as follows

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

I followed https://computingforgeeks.com/install-redmine-on-ubuntu-linux/ to create it.

Once I moved the database over, I ran `RAILS_ENV=production bundle exec rake db:migrate`, which appeared to execute successfully, although it did report a few warnings (https://pastebin.com/yzNpHiKm) - I'm not sure if they're relevant as I don't know much about ruby.

I can see all of my old tickets are there etc, but when I try to view one or create a new one it throws a 500, reporting the following into the logs

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'

Any help with this would be massively appreciated. I'm completely stuck.


Replies (3)

RE: 500 Error after migrating data to new instance 3.2 -> 4.0 - Added by Nate Green over 3 years ago

Hi,

I already provided exactly that in the first snipped I pasted?

RE: 500 Error after migrating data to new instance 3.2 -> 4.0 - Added by Lorenzo Meneghetti over 3 years ago

Nate Green wrote:

Hi,

I already provided exactly that in the first snipped I pasted?

Oops, sorry, browsing from tablet... did not see!

Anyway, referring to Requirements Ruby 2.7.0 is not supported.Please back port ruby to an earlier version.

Thanks
Lorenzo

    (1-3/3)