Feature #31128

Drop Ruby < 2.5 support

Added by Marius BALTEANU over 2 years ago. Updated 2 months ago.

Status:ReopenedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Ruby support
Target version:5.0.0
Resolution:Fixed

Description

Rails 6 requires at least Ruby 2.5.0

root@85be5e8d7c3e:/work# bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "ruby":
  In Gemfile:
    ruby

    rails (= 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
      ruby (>= 2.5.0)

0001-Drop-Ruby-2.5-Support.patch Magnifier (1.4 KB) Go MAEDA, 2021-03-29 05:49

0002-Update-TargetRubyVersion-of-RuboCop-to-2.5.patch Magnifier (2 KB) Go MAEDA, 2021-03-29 05:49


Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 New
Blocks Redmine - Patch #35000: Update SimpleCov to 0.21 Closed
Blocks Redmine - Patch #35025: Update capybara to 3.35.3 Closed

Associated revisions

Revision 20902
Added by Go MAEDA 7 months ago

Drop Ruby < 2.5 support (#31128).

Revision 20903
Added by Go MAEDA 7 months ago

Update .rubocop_todo.yml (#31128).

Revision 20904
Added by Go MAEDA 7 months ago

Set TargetRubyVersion of RuboCop to 2.5 (#31128).

History

#1 Updated by Marius BALTEANU over 2 years ago

#2 Updated by Marius BALTEANU over 2 years ago

#3 Updated by Marius BALTEANU over 2 years ago

#4 Updated by Marius BALTEANU over 1 year ago

  • Target version changed from Unplanned backlogs to 5.0.0

#5 Updated by Go MAEDA 7 months ago

The attached patches drop Ruby 2.4 support.

As Marius wrote, Rails 6 requires Ruby 2.5 or later. We have to migrate to Rails 6 in Redmine 5.0 because the support for Rails 5.2 which we are currently using will end when Rails 7.0 (the next version of Rails) is released.

And Ruby 2.4 has already become EOL in March 2020.

#6 Updated by Go MAEDA 7 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Done.

#7 Updated by Go MAEDA 7 months ago

#8 Updated by Go MAEDA 7 months ago

#9 Updated by Marius BALTEANU 2 months ago

  • Status changed from Closed to Reopened

I'm reopening this to discuss the option to drop support for Ruby 2.5 as well.

I wrote in #32424#note-62:

Rails 6.1 and Redmine 5.0.0 supports minimum Ruby 2.5, but the CommonMarker latest version (0.22.0) supports minimum Ruby 2.6.

We should drop support for Ruby 2.5 or we should stick with commonmarker version 0.21.0 if ruby is 2.5? Note that Ruby 2.5 is EOL since March this year.

Holger Just wrote in #32424#note-63:

I would be fine with requiring Ruby 2.6 for Redmine 5.0.

Some notes here:

  • Debian 11 Bullseye is going to ship with Ruby 2.7 on August 14.
  • Ubuntu >= 20 ships with Ruby 2.7
  • Debian 10 (Buster) and Ubuntu 18.04 (bionic) still ship Ruby 2.5. Users would have to either use a custom Ruby or stay on Redmine 4.2
  • CentOS 8 / Redhat 8 can install Ruby 2.7 with dnf.
  • For Windows, there are usable installers for current Rubies.

With this change, we would thus cut off Debian 10 and Ubuntu 18.04 with their respective system-default Rubies. They can install a custom Ruby with rvm / rbenv / ruby-install though.

#10 Updated by Mischa The Evil 2 months ago

It might be a good idea to even drop support for 2.6 too if this can be done without any additional cost (which seems to be the case given the info provided by Holger).
Already requiring Ruby 2.7 for Redmine 5.x.x will ease the future upgrade to Rails 7.x, which will require 2.7.0+ whereas 3.0+ would be preferred1, thus easing an upgrade from Redmine 5.x to 6.x (where 6.x is given to be running on Rails 7.x).

1 source: Ruby on Rails 7.0 Release Notes

Also available in: Atom PDF