Defect #33021
closed
[v.4.0.5-stable] Internal Server Error 500 when accessing 'repository' tab
Added by Matthew Sexton almost 5 years ago.
Updated almost 3 years ago.
Description
Using Arch Linux kernel version 5.5.3-arch1-1, Redmine served using mod_passenger (v6.0.4-2) on Apache (2.4.41-1). Trying to access 'repository' tab gives error 500. Changesets can be viewed, and git integration otherwise works well. Issues tagged in commit msgs are properly closed/referenced.
Environment:
Redmine version 4.0.5.stable
Ruby version 2.7.0-p0 (2019-12-25) [x86_64-linux]
Rails version 5.2.3
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery sendmail
SCM:
Git 2.25.1
Filesystem
Redmine plugins:
redmine_messenger 1.0.6
App 244788 output: Started GET "/tracker/projects/(PROJECT)/repository" for (IP-ADDRESS) at 2020-02-18 11:18:50 -0500
App 244788 output: Processing by RepositoriesController#show as HTML
App 244788 output: Parameters: {"id"=>"(LOCAL_USER)"}
App 244788 output: Current user: (REDMINE_USER) (id=5)
App 244788 output: Completed 500 Internal Server Error in 30ms (ActiveRecord: 7.6ms)
App 244788 output:
App 244788 output: FrozenError (can't modify frozen String: ""):
App 244788 output:
App 244788 output: lib/redmine/scm/adapters/abstract_adapter.rb:279:in `force_encoding'
App 244788 output: lib/redmine/scm/adapters/abstract_adapter.rb:279:in `scm_iconv'
App 244788 output: lib/redmine/scm/adapters/git_adapter.rb:136:in `entries'
App 244788 output: app/models/repository/git.rb:98:in `scm_entries'
App 244788 output: app/models/repository.rb:204:in `entries'
App 244788 output: app/controllers/repositories_controller.rb:86:in `show'
App 244788 output: lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Manually Downgraded the following packages:
ruby (2.7.0-1 => 2.6.5-1)
rubygems (3.1.2-4 => 3.0.6-1)
ruby-bundler (2.1.4-1 => 2.0.2-1)
and re-ran bundle install --without development test
which fixed the problem. This was my mistaken, looking at the installation guide it does not list ruby 2.7 as supported.
However: It is a good note that I ran Redmine with Ruby 2.7 since December and in the entire time this was the only issue I ran into. Everything else worked pretty flawlessly.
It would be great to debug and fix this problem so Arch can switch to ruby2.7 and avoid pulling the old ruby version.
Anatol Pomozov wrote:
It would be great to debug and fix this problem so Arch can switch to ruby2.7 and avoid pulling the old ruby version.
Only Redmine 4.2.0 will have official support for ruby2.7, the fixes won't be back ported to previous versions. You will need to update your Redmine version when the release will be available or manually backport the fixes which I do not recommend.
Marius BALTEANU wrote:
Only Redmine 4.2.0 will have official support for ruby2.7, the fixes won't be back ported to previous versions.
I wonder what is the reason behind this development practice? ruby 2.7 is mostly compatible with 2.6. And Matthew example above confirms it:
I ran Redmine with Ruby 2.7 since December and in the entire time this was the only issue I ran into
From my experience making a script compatible with ruby2.7 does not require too much efforts. It would be great to see redmine 4.0 compatible with ruby 2.7.
This summer am working on upgrading our Redmine node also. My few plugins and using Subversion all worked fine with Ruby 2.7 - I made the same error!
There are MANY deprecation warnings which clutter up the log - but it all works / appears to work!
Matthew Sexton wrote:
<snip>
However: It is a good note that I ran Redmine with Ruby 2.7 since December and in the entire time this was the only issue I ran into. Everything else worked pretty flawlessly.
</snip>
This issue has been resolved as of Redmine v 4.2.4. I pulled it from the subversion repository and configured and installed on ubuntu server 20.04. Initially installed from the ubuntu repository -- which has this issue because it is version 4.0.*
Environment:
Redmine version 4.2.4.stable.21431
Ruby version 2.7.0-p0 (2019-12-25) [x86_64-linux-gnu]
Rails version 5.2.6.2
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.13.0
Git 2.25.1
Filesystem
Redmine plugins:
no plugin installed
- Status changed from New to Closed
- Resolution set to Wont fix
Updating your Redmine to 4.1 or later fixes the issue. Closing.
Also available in: Atom
PDF