Can't install Nokogiri for Ruby in Windows
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:
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:
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.
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 intoC:\rubies\ruby-2-0-0-x86
and the associated DevKit intoC:\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\binInject DevKit into the right ruby install: Once you have ruby installed and can get the correct info when you type
ruby -v
, then runruby dk.rb init
-- which will get DevKit set up & 'injected' into the correct ruby version. (N.B. I always have to edit theconfig.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.)
Error installing Nokogiri via Bundler on Windows
This particular version of Nokogiri is listed in Gemfile.lock. You can remove that file, run bundle install again and see if it works.
This is more a workaround than a proper solution, but dependencies in Gemfile.lock
are quite old so it would be a good thing to refresh them anyway.
Unable to gem install nokogiri
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.
It seems you're not the only one with this issue: https://github.com/sparklemotion/nokogiri/issues/1456
How to install Nokogiri Gem for Windows
You need DevKit to compile the gem properly.
Can't install Nokogiri 1.4.3 gem
I managed to get 1.4.7
to install by doing (close to) the following:
git clone git@github.com:sparklemotion/nokogiri.git
cd nokogiri
gem install rake-compiler hoe racc rexical
git checkout v1.4.7 # 1.4.3 in your case
# edit ./ext/nokogiri/extconf.rb and replace `Config` with `RbConfig`
rake install_deps
rake install_gem
Hopefully I didn't forget a step.Edit: Scratch that, the installed gem doesn't work. I'm going to leave this here for now in case it helps someone.
Edit (Jonas): Hint for the solution is in a bug report. I stick with Ruby 2.1.5 and it solved this issue.
Nokogiri error install
Delete your path folder(if it shows) and your Gemfile.lock .
Then place this in your gem file
gem 'nokogiri', '~> 1.6', '>= 1.6.8.1'
After that run bundle install .Remove the nokogiri from your gemfile
Related Topics
Error Installing Rdoc Documentation: Incompatible Encoding Regexp Match
Without Converting to a String, How Many Digits Does a Fixnum Have
Download a Carrierwave Upload from S3
How to Set in a Middleware a Variable Accessible in All My Application
How to Change "3 Errors Prohibited This Foobar from Being Saved" Validation Message in Rails
Pg.Rb Segmentation Fault [Mojave Upgrade]
How to Validate Overlapping Times in Rails with Postgresql
How to Test (Rspec) a Http Request That Takes Too Long
Skipping: Touch Associations When Saving an Activerecord Object
Sorting a Multidimensional Array in Ruby
Rails - Understanding Application.Js and Application.CSS
Rails3 Activerecord::Statementinvalid:... No Such Table in Every Test
Rendering a View from My Ruby on Rails Gem
What's The Best Way to Test Delayed_Job Chains with Rspec
How to Create Thor::Group Generators as Args of My_Command
Why Can't Net::Ftp Connect to Server
Script Executes Successfully in Commandline But Not as a Cronjob