プロジェクト

全般

プロフィール

Vote #80613

完了

Redmine 4.1 installation fails due to an attempt to install sprockets 4.0.0 if bundler prior to 1.15.2 is used on Ruby prior to 2.5

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

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

0%

予定工数:
category_id:
45
version_id:
160
issue_org_id:
32839
author_id:
20632
assigned_to_id:
332
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
127
ステータス-->[Closed]

説明

When we upgraded to Redmine 4.1.0 from 4.0.6 we encountered an error when bundler attempted to install sprockets 4.0.0:

Fetching sprockets 4.0.0
Installing sprockets 4.0.0
Gem::InstallError: sprockets requires Ruby version >= 2.5.0.
An error occurred while installing sprockets (4.0.0), and Bundler cannot
continue.
Make sure that `gem install sprockets -v '4.0.0' --source 'https://rubygems.org/'` succeeds
before bundling.

Our Redmine instance is running on an Ubuntu 16.04 system which provides Ruby 2.3. According to the official docs, Ruby 2.3 is still supported.

We worked around the issue by manually including the change in r18634 to our @Gemfile.local@ file.


journals

I have confirmed that the error occurs if the version of @bundler@ is 1.15.1 or earlier.

I think we have two options to fix this issue:

* Option 1: Raise the minimum required version of @bundler@ to 1.15.2 by updating Gemfile (source:tags/4.1.0/Gemfile#L3) and make users upgrade @bundler@. Since bundler 1.15.1 that was released in June 2017 is so old, I prefer this approach.
* Option 2: Apply the following patch. I don't like this because it adds 3 lines to Gemfile.

<pre><code class="diff">
Index: Gemfile
===================================================================
--- Gemfile (リビジョン 19434)
+++ Gemfile (作業コピー)
@@ -16,6 +16,9 @@
gem "i18n", "~> 1.6.0"
gem "rbpdf", "~> 1.20.0"

+# Remove the following line when Redmine drops the support for Ruby 2.4 (#32839)
+gem 'sprockets', '~> 3.7.2' if RUBY_VERSION < '2.5'
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]

</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the fix.

Go MAEDA wrote:
> * Option 1: Raise the minimum required version of @bundler@ to 1.15.2 by updating Gemfile (source:tags/4.1.0/Gemfile#L3) and make users upgrade @bundler@. Since bundler 1.15.1 that was released in June 2017 is so old, I prefer this approach.
> * Option 2: Apply the following patch. I don't like this because it adds 3 lines to Gemfile.

The committed fix is option 2. I have changed my mind that it is not a good idea to have admins do extra work like upgrading Bunlder.
--------------------------------------------------------------------------------


related_issues

relates,Closed,32223,Disable sprockets to avoid Sprockets::Railtie::ManifestNeededError raised by sprockets 4.0.0
blocks,Closed,32841,Drop support for Bundler prior to 1.12.0

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

  • カテゴリGems support_45 にセット
  • 対象バージョン4.1.1_160 にセット

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

いいね!0
いいね!0