Currently, source:tags/4.1.0/doc/INSTALL says that Redmine 4.1.0 supports Ruby 2.3 or later. However, Redmine 4.1.0 does not yet support Ruby 2.7 (#31500).
The document should list all supported Ruby versions to prevent users from using unsupported the latest Ruby version.
A probably better option would be to set this as a dependency in the Gemfile: https://bundler.io/v1.12/gemfile_ruby.html That would ensure that a compatible ruby version is used. What do you think?
A probably better option would be to set this as a dependency in the Gemfile: https://bundler.io/v1.12/gemfile_ruby.html That would ensure that a compatible ruby version is used. What do you think?
Subject changed from List all supported Ruby versions in doc/INSTALL to Specify supported Ruby version in Gemfile
Category changed from Documentation to Ruby support
Jean-Philippe Lang wrote:
A probably better option would be to set this as a dependency in the Gemfile: https://bundler.io/v1.12/gemfile_ruby.html That would ensure that a compatible ruby version is used. What do you think?
It is a more sophisticated way than simply describing in the document. I didn't know the feature of Bundler. Thank you for the advice.
The attached is a new patch that updates both Gemfile and doc/INSTALL.
The ruby directive in Gemfile is supported by bundler 1.12.0 or later. So, r19425 causes the following error when a user runs bundle install if the version of bundler is prior to 1.12.0.
$ bundle -v
Bundler version 1.11.2
$ bundle install
[!] There was an error parsing `Gemfile`: no implicit conversion of Symbol into Integer. Bundler cannot continue.
# from /Users/maeda/redmines/trunk/Gemfile:3
# -------------------------------------------
#
> ruby '>= 2.3.0', '< 2.7.0'
# gem "bundler", ">= 1.5.0"
# -------------------------------------------
You can avoid the error by skipping the ruby directive with the following patch. The version of Ruby is not checked if you run an older version of Bundler that does not support ruby directive.