如何安装Nokogiri Gem for Windows

tii*_*in4 6 gem ruby-on-rails jruby nokogiri

我对nokogiri的宝石有这个问题:

无法打开库'C:\ Ruby187\lib\ruby​​\gems\1.8\gems \nokogiri-1.4.6-x86-mingw32\ext \nokogiri\libxml2.dll':未知

我读到我必须尝试1.5.0.beta3版本.但是,当我跑

C:\Users\t3en4>gem install nokogiri --pre
Fetching: nokogiri-1.5.0.beta.4.gem (100%)
ERROR:  Error installing nokogiri:
        The 'nokogiri' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

Jam*_*Tan 8

哇,我找到了解决方案,有64位的nokogiri

转到rubygems,转到nokogiri gem,看看版本列表!

https://rubygems.org/gems/nokogiri

注意x64-mingw32和x86-mingw32版本

花了我几个小时来搞清楚这一点...... 在此输入图像描述


mis*_*ves 6

您需要DevKit才能正确编译gem.

  • 我必须运行:C:\ DevKit> gem install nokogiri - --with-xml2-lib --with-xslt-lib --plataform = ruby (11认同)
  • 我得到:libxml2丢失了.请访问http://nokogiri.org/tutorials/installing_nokog iri.html以获取有关安装依赖项的帮助. (2认同)