Defect #27505

Cannot install nokogiri 1.7 on Windows Ruby 2.4

Added by Alexander Ryabinovskiy 8 months ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Gems support
Target version:3.4.4
Resolution:Fixed Affected version:3.4.3

Description

I can`t install Redmine 3.4.3 with Ruby 2.4, because it needs nokogiri 1.7.2
nokogiri 1.7.2 has limitation:
REQUIRED RUBY VERSION:
< 2.4, >= 2.1.0

We can use nokogiri >= 1.8.0 in Gemfile for Ruby 2.4


Related issues

Related to Redmine - Defect #26183: Use Nokogiri 1.7.2 Closed
Related to Redmine - Patch #26503: Update nokogiri gem (~> 1.8.0) Closed
Duplicated by Redmine - Defect #27861: bundle install fails for nokogiri 1.7.2 (x64-mingw32) and... Closed

Associated revisions

Revision 17112
Added by Toshi MARUYAMA 7 months ago

3.4-stable: Gemfile: use nokogiri 1.8 for Ruby >= 2.1 (#27505)

History

#1 Updated by Toshi MARUYAMA 8 months ago

  • Status changed from New to Needs feedback

I cannot reproduce on my CentOS 7.
Do you use Windows?
It seems Nokogori switches requiring Ruby version by OS.
https://github.com/sparklemotion/nokogiri/blob/v1.7.2/Rakefile#L235

#2 Updated by Toshi MARUYAMA 8 months ago

#3 Updated by Ivan Cenov 7 months ago

I cannot install Redmine 3.4.3 in following configuration

E:\data\redmine>ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [i386-mingw32]

E:\data\redmine>cmd /version
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
Ruby is installed from https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.4.2-2/rubyinstaller-2.4.2-2-x86.exe (the link from https://rubyinstaller.org/downloads/).

Gemfile:

gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.7.2" : "~> 1.6.8")

Report

E:\data\redmine>bundle install --without development test rmagick
Ignoring thin-1.7.2 because its extensions are not built.  Try: gem pristine thin --version 1.7.2
Ignoring thin-1.7.2 because its extensions are not built.  Try: gem pristine thin --version 1.7.2
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "ruby ":
  In Gemfile:
    ruby  x86-mingw32

    nokogiri (~> 1.7.2) x86-mingw32 was resolved to 1.7.2, which depends on
      ruby  (< 2.4) x86-mingw32

#4 Updated by Ivan Cenov 7 months ago

P.S. After changing Gemfile:

gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.7.2" : "~> 1.6.8")
to
gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.2" : "~> 1.6.8")
the installation proceeded with installation 1.8.1.

#5 Updated by Toshi MARUYAMA 7 months ago

  • Related to Patch #26503: Update nokogiri gem (~> 1.8.0) added

#7 Updated by Toshi MARUYAMA 7 months ago

  • Subject changed from Ruby 2.4 + nokogiri 1.7.2 to Cannot install nokogiri 1.7 on Windows Ruby 2.4

#8 Updated by Toshi MARUYAMA 7 months ago

  • Status changed from Needs feedback to Closed
  • Target version set to 3.4.4
  • Resolution set to Fixed

r17112 updates nokogiri version.

#9 Updated by Toshi MARUYAMA 7 months ago

  • Duplicated by Defect #27861: bundle install fails for nokogiri 1.7.2 (x64-mingw32) and ruby 2.4.3 on Windows added

Also available in: Atom PDF