Defect #33768

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

Added by Go MAEDA 19 days ago. Updated 17 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Gems support
Target version:4.1.2
Resolution:Fixed Affected version:4.1.0

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" 

Associated revisions

Revision 19938
Added by Go MAEDA 17 days ago

Bundler may fail to install stringio if Ruby prior to 2.5 is used (#33768).

Patch by Go MAEDA.

Revision 19939
Added by Go MAEDA 17 days ago

Merged r19938 from trunk to 4.1-stable (#33768).

History

#1 Updated by Go MAEDA 17 days ago

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Target version set to 4.1.2
  • Resolution set to Fixed

Committed the patch.

#2 Updated by Go MAEDA 17 days ago

  • Subject changed from Bundler 1.15.1 or ealier fails to install stringio if Ruby prior to 2.5 is used to Bundler may fail to install stringio if Ruby prior to 2.5 is used

I observed that also Bundler 1.16.1 fails.

#3 Updated by Go MAEDA 17 days ago

  • Status changed from Resolved to Closed
  • Affected version set to 4.1.0

Also available in: Atom PDF