首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在IRB中装载"nokogiri“

无法在IRB中装载"nokogiri“
EN

Stack Overflow用户
提问于 2013-02-06 13:42:42
回答 2查看 633关注 0票数 0

我已经在所需的Rubylib文件中安装了nokogiri,如下所示:

代码语言:javascript
复制
C:\Ruby193>gem list

*** LOCAL GEMS ***

addressable (2.3.2)
bigdecimal (1.1.0)
builder (3.1.4)
bundler (1.2.3)
childprocess (0.3.6)
domain_name (0.5.7)
ffi (1.3.1 x86-mingw32)
git (1.2.5)
hoe (3.4.1)
httpclient (2.3.2)
io-console (0.3)
jar_wrapper (0.1.2)
jeweler (1.8.4)
json (1.5.4)
libwebsocket (0.1.7.1)
mechanize (2.5.1)
mechanize-downloader (0.0.1)
mime-types (1.19)
mini_magick (3.2.1)
minitest (2.5.1)
multi_json (1.5.0)
net-http-digest_auth (1.2.1)
net-http-persistent (2.8)
nokogiri (1.5.6 x86-mingw32)
ntlm-http (0.1.1)
progressbar (0.12.0)
rake (0.9.2.2)
rautomation (0.7.3)
rdoc (3.9.4)
rubyzip (0.9.9)
s4t-utils (1.0.4)
selenium (0.2.5)
selenium-webdriver (2.27.2)
subexec (0.0.4)
unf (0.0.5)
unf_ext (0.0.5 x86-mingw32)
user-choices (1.1.6.1)
watir-classic (3.4.0)
watir-webdriver (0.6.2)
webrobots (0.0.13)
websocket (1.0.6)
win32-api (1.4.8 x86-mingw32)
win32-process (0.7.1)
win32screenshot (1.0.7)
windows-api (0.4.2)
windows-pr (1.2.2)
xml-simple (1.1.2)
zip (2.0.2)

现在在下面,当我尝试nokogiri__时,会得到下面的错误,而它是安装在我的桌面上。

代码语言:javascript
复制
C:\Ruby193>irb
irb(main):001:0> require 'nokogiri'
LoadError: cannot load such file -- nokogiri
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
        from (irb):1
        from C:/Ruby193/bin/irb:12:in `<main>'
irb(main):002:0> require 'selenium-webdriver'
=> true
irb(main):003:0>
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-02-06 13:47:26

您是否尝试过安装mswin32-60版本而不是x86-mingw32版本?

代码语言:javascript
复制
gem install nokogiri --platform=x86-mswin32-60

编辑

或者,尝试更新rubygems版本的gem update --system

票数 1
EN

Stack Overflow用户

发布于 2013-02-27 02:42:08

确保在require 'rubygems'之前调用require 'nokogiri'

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14730555

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档