Project

General

Profile

Actions

Defect #32839

closed

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

Added by Deoren Moor almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Gems support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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.


Related issues

Related to Redmine - Defect #32223: Disable sprockets to avoid Sprockets::Railtie::ManifestNeededError raised by sprockets 4.0.0ClosedGo MAEDA

Actions
Blocks Redmine - Patch #32841: Drop support for Bundler prior to 1.12.0ClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA almost 5 years ago

  • Category changed from Ruby support to Gems support
  • Status changed from New to Confirmed
  • Target version set to 4.1.1

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

Actions #2

Updated by Go MAEDA almost 5 years ago

  • Related to Defect #32223: Disable sprockets to avoid Sprockets::Railtie::ManifestNeededError raised by sprockets 4.0.0 added
Actions #3

Updated by Go MAEDA almost 5 years ago

  • Blocks Patch #32841: Drop support for Bundler prior to 1.12.0 added
Actions #4

Updated by Go MAEDA almost 5 years ago

  • Subject changed from Upgrading from Redmine v4.0.6 to v4.1.0 attempts installation of sprockets 4.0.x for Ruby 2.3.x to 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
  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

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.

Actions

Also available in: Atom PDF