Can't install Nokogiri for Ruby in Windows

孤人 提交于 2019-12-03 15:20:36

Update: As of version 1.6.2, Nokogiri now does support the 64-bit version of Ruby 2.0.0. (Note that it requires libxml >= 2.6.21 )

Here's the answer if you still need to install the x86 version for some reason or if you want to understand how to install and build a gem using DevKit:


Nokogiri does not yet support the 64-bit version of Ruby 2.0.0. You can read about it and follow the status here.

But Nokogiri does support the x86 version of ruby 2.0.0. You should be able to install the gem in on 2.0.0 x86 install.

It's pretty easy to hand-install. I prefer that over RailsInstaller because I need to maintain other things as they are. Here's how:

  1. Download and unzip the files for the version you need. Be sure to download the correct version of DevKit for the x86 version of 2.0.0.

  2. Fix your path: Make sure your path includes the directories to the right ruby, gem, and DevKit dirs: Assume you installed the x86 version of ruby 2.0.0 into C:\rubies\ruby-2-0-0-x86 and the associated DevKit into C:\rubies\DevKit-xxxx-x86 you will need to include these directories in your PATH:

    C:\rubies\ruby-2-0-0-x86\bin C:\rubies\ruby-2-0-0-x86\lib\ruby\gems\2.0.0 C:\rubies\DevKit-xxxx-x86\bin

  3. Inject DevKit into the right ruby install: Once you have ruby installed and can get the correct info when you type ruby -v, then run ruby dk.rb init -- which will get DevKit set up & 'injected' into the correct ruby version. (N.B. I always have to edit the config.yml file that is produced and put in the correct path to the ruby installation I want. Don't sweat it if you need to do that.)

Yup ... Downgrading to 1.9.3 worked . Tnx for help . I put the summary here :

  • Install Ruby 1.9.3 ( Do not change Install Name to ex.RubyLang or
    config doesn't find it automatically )

  • Install DevKit (Follow DevKit Installation Steps)

  • Install Nokogiri

I wasn't able to install x64 Nokogiri for Ruby 2.0 on Windows 7, but the binary gem seems to be working.

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