Project

General

Profile

Actions

Defect #33768

closed

Bundler may fail to install stringio if Ruby prior to 2.5 is used

Added by Go MAEDA over 4 years ago. Updated over 4 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

bundle install fails if you use Ruby < 2.5 and bundler < 1.15.2.

Gem::InstallError: stringio requires Ruby version >= 2.5.
An error occurred while installing stringio (0.1.3), and Bundler
cannot continue.
Make sure that `gem install stringio -v '0.1.3'` succeeds before bundling.

In Gemfile:
  csv was resolved to 3.1.6, which depends on
    stringio

This is because Bundler attempts to install csv 3.1.6 that does not support Ruby 2.4. csv 3.1.6 itself supports Ruby 2.3 or later, however, a dependant stringio 0.1.3 requires Ruby 2.5 or higher.

It can be fixed with the following patch.

Index: Gemfile
===================================================================
--- Gemfile    (revision 19912)
+++ Gemfile    (working copy)
@@ -12,7 +12,7 @@
 gem "roadie-rails", (RUBY_VERSION < "2.5" ? "~> 1.3.0" : "~> 2.1.0")
 gem "mimemagic" 
 gem "mail", "~> 2.7.1" 
-gem "csv", "~> 3.1.1" 
+gem 'csv', (RUBY_VERSION < '2.5' ? ['>= 3.1.1', '< 3.1.5'] : '~> 3.1.1')
 gem "nokogiri", "~> 1.10.0" 
 gem 'i18n', '~> 1.8.2'
 gem "rbpdf", "~> 1.20.0" 
Actions

Also available in: Atom PDF