How to install Nokogiri Gem for Windows

℡╲_俬逩灬. 提交于 2019-12-18 11:44:27

问题


I'm having this problem with nokogiri's gem:

Could not open library 'C:\Ruby187\lib\ruby\gems\1.8\gems\nokogiri-1.4.6-x86-mingw32\ext\nokogiri\libxml2.dll' : unknown

I read that I had to try the 1.5.0.beta3 version. However, when I run

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'

What should I do?


回答1:


You need DevKit to compile the gem properly.




回答2:


wow, i found the solution, there is a nokogiri for 64bits

goto rubygems, goto nokogiri gem, and look at the version list!

https://rubygems.org/gems/nokogiri

notice the x64-mingw32 and x86-mingw32 version

took me hours to figure this out...



来源:https://stackoverflow.com/questions/6455762/how-to-install-nokogiri-gem-for-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!