Nokogiri requires Ruby version <2.3

I am trying to get Rails to run on Windows 10. I am using Ruby 2.3.0 and Rails 4.2.6 and temporarily using Nokogiri 1.6.3.

When I run rails new demo , it returns an error:

 An error occurred while installing nokogiri (1.6.7.2), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.6.7.2'` succeeds before bundling. 

When I run gem install nokogiri -v '1.6.7.2 , I get:

 ERROR: Error installing nokogiri: nokogiri requires Ruby version < 2.3, >= 1.9.2. 

How to update Nokogiri and make Rails work?

+5
source share
5 answers

Install the latest version of Nokogiri . In the gemfile:

 gem 'nokogiri', '~> 1.6.8.rc2' 
+10
source

use bundle update nokogiri , but also check ruby ​​version ruby ruby -v

+2
source

I recently encountered the same problem when installing rails on windows with Ruby v2.4.1 I found that deleting the gemfile line:

 gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 

then bundle update works

, then putting the tzinfo-data string back into the gemfile

Then I could run the package without any problems. Everything is working well again.

0
source

The problem is resolved in Done. Nokogiri 1.8.0.

0
source

I had the same problem as you. On Windows, you need to perform an additional step:

http://www.nokogiri.org/tutorials/installing_nokogiri.html

-1
source

Source: https://habr.com/ru/post/1247963/


All Articles