When attempting to use gem install nokogiri
I'm getting the following error:
ERROR: Error installing nokogiri:
nokogiri requires Ruby version < 2.3, >= 1.9.2.
However if I do ruby -v
:
ruby 2.3.0p0 (2015-12-25 revision 53290) [i386-mingw32]
I've attempted to install it locally, gem install --local nokogiri
and it runs through the install process, however when I attempt to use the gem, it won't find the file:
C:/Ruby23/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
: cannot load such file -- nokogiri (LoadError)
Does anyone have a work around for this? Or am I pretty much stuck without nokogiri
?
I think the answer was staring us in the face, your version of nokogiri requires Ruby less than 2.3, and you're running ruby 2.3.
It seems you're not the only one with this issue: https://github.com/sparklemotion/nokogiri/issues/1456
After some hassle and some research, I used gem install nokogiri --pre
and wouldn't you know it:
Fetching: nokogiri-1.6.8.rc3-x86-mingw32.gem (100%)
Nokogiri is built with the packaged libraries: libxml2-2.9.3, libxslt-1.1.28, zlib-1.2
.8, libiconv-1.14.
Successfully installed nokogiri-1.6.8.rc3-x86-mingw32
Parsing documentation for nokogiri-1.6.8.rc3-x86-mingw32
Installing ri documentation for nokogiri-1.6.8.rc3-x86-mingw32
Done installing documentation for nokogiri after 12 seconds
1 gem installed
I found the answer to this question here I've also looked into it on GitHub (as mentioned by Aaron_H) and it seems that this is only happening on Windows, so if you really need nokogiri
you need to do gem install nokogiri --pre
in order to get it (on Windows 7 anyways).