Upgrade error, "Template::Error (undefined method `description' for #<Tracker"
Added by Gary Aitken almost 4 years ago
I'm getting an error after building a new system and migrating redmine 3.4.5 to 4.1.1.
After much trouble (redmine, ruby packages could not be used due to old versions) I got redmine to run. I then archived the old db and "files" subtree, reloaded the db on the new system, and untarred the files subtree. After logging in, attempted expansion of any project fails:
Internal error ... check your log files for details about the error
and the log shows:
Started GET "/issues/projects/issues" for 66.109.141.60 at 2020-12-28 04:05:17 +0000 Processing by ProjectsController#show as HTML Parameters: {"id"=>"issues"} Current user: garya (id=20) Rendering projects/show.html.erb within layouts/base Rendered projects/show.html.erb within layouts/base (21.7ms) Completed 500 Internal Server Error in 105ms (ActiveRecord: 16.3ms) ActionView::Template::Error (undefined method `description' for #<Tracker:0x00007f9444a1ce50>): 65: <% @trackers.each do |tracker| %> 66: <tr> 67: <td class="name"> 68: <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id), :title => tracker.description %> 69: </td> 70: <td> 71: <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>
I'm guessing the "description" it refers to is the description field of a project. In case it is relevant, it is the only "text" field in the "project" description in the database.
Version / upgrade details:
On ubuntu 16 ruby 2.4.3p205 rails 5.1.4 redmine 3.4.5 On ubuntu 18 ruby 2.6.6p146 rails 5.2.4.4 redmine 4.1.1
I can't seem to find where to run "RAILS_ENV=production script/about" from, as suggested in the how to post msg. ruby is installed via rvm under /usr/local/rvm, but there is no "script/about" in there. rails was installed using "gem install rails --version ~>5.2". redmine was downloaded and unpacked in /opt/redmine/redmine-4.1.1 and installed with
sudo -i -u redmine cd ~/redmine bundle config set without 'development test' bundle install
A search found a few things which looked related indicating the problem might be plugins related, but I can't tell if the old version even uses plugins. I suspect the error is not plugins related, as the description field is likely part of the project base object. There were four plugins installed in the original system:
Additonals 2.0.8 don't know if ever used Clipboard Image Paste No longer compatible, not sure if ever used Redmine Issue from Excel plugin No longer compatible, not sure if ever used Redmine Omniquth google plugin No longer compatible, not sure if ever used
I have not installed the Additionals plugin, as I don't know how to determine what RAILS_ROOT is.
Suggestions?
Replies (1)
RE: Upgrade error, "Template::Error (undefined method `description' for #<Tracker" - Added by Gary Aitken almost 4 years ago
I just found this note; not sure why I didn't see it earlier:
https://www.redmine.org/boards/2/topics/59028
As suggested there, I did:
sudo -i -u redmine cd /opt/redmine/redmine-4.1.1 RAILS_ENV=production bundle exec rake db:migrate exit sudo apache2ctl restart
That seems to have solved the problem.
I am using mysql 5.7.32-0ubuntu0.18.04.1, and have not converted any charsets up to utf8mb4.
Is that required or just a suggestion? I don't see it on this page:
https://www.redmine.org/news/127