无法 gem 安装 nokogiri [英] Unable to gem install nokogiri
问题描述
尝试使用gem install nokogiri
我收到以下错误:
ERROR: Error installing nokogiri:
nokogiri requires Ruby version < 2.3, >= 1.9.2.
但是,如果我执行 ruby -v
:
ruby 2.3.0p0 (2015-12-25 revision 53290) [i386-mingw32]
我尝试在本地安装它,gem install --local nokogiri
并且它运行在安装过程中,但是当我尝试使用 gem 时,它找不到该文件:
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)
有没有人解决这个问题?还是我在没有 nokogiri
的情况下几乎卡住了?
Does anyone have a work around for this? Or am I pretty much stuck without nokogiri
?
推荐答案
我认为答案就在眼前,您的 nokogiri 版本需要 Ruby < 2.3,而您正在运行红宝石 2.3.
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.
似乎您不是唯一遇到此问题的人:https://github.com/sparklemotion/nokogiri/issues/1456
It seems you're not the only one with this issue: https://github.com/sparklemotion/nokogiri/issues/1456
这篇关于无法 gem 安装 nokogiri的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!