プロジェクト

全般

プロフィール

Vote #80594

完了

Specify supported Ruby version in Gemfile and doc/INSTALL

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Ruby support_33
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
33
version_id:
159
issue_org_id:
32788
author_id:
332
assigned_to_id:
332
comments:
8
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
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?

I’m in favor of this option.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.

<pre>
$ 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"
# -------------------------------------------
</pre>

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.

<pre><code class="diff">
diff --git a/Gemfile b/Gemfile
index 78db5caf8..bcc58ee35 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

-ruby '>= 2.3.0', '< 2.7.0'
+ruby '>= 2.3.0', '< 2.7.0' if Bundler::VERSION >= '1.12.0'
gem "bundler", ">= 1.5.0"

gem "rails", "5.2.4.1"
</code></pre>

--------------------------------------------------------------------------------
Committed the fix described in #32788#note-7.
--------------------------------------------------------------------------------


related_issues

relates,Closed,32787,Redmine 4.0 no longer supports Ruby 2.2
relates,Closed,32841,Drop support for Bundler prior to 1.12.0

Admin Redmine さんが4年以上前に更新

  • カテゴリRuby support_33 にセット
  • 対象バージョン4.0.7_159 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0