Vote #80982
完了Bundler may fail to install stringio if Ruby prior to 2.5 is used
0%
説明
@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":https://rubygems.org/gems/csv/versions/3.1.6 itself supports Ruby 2.3 or later, however, a dependant "stringio 0.1.3":https://rubygems.org/gems/stringio/versions/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"
journals
Committed the patch.
--------------------------------------------------------------------------------
I observed that also Bundler 1.16.1 fails.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------