プロジェクト

全般

プロフィール

Vote #80982

完了

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

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

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

0%

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

説明

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

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

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

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

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

いいね!0
いいね!0