Getting Nokogiri working under Mac OS X

The official Installation documentation states:

sudo port install libxml2 libxslt
sudo gem install nokogiri

however I found this not to work for me. The following did work.

$ sudo port install libxml2 libxslt

$ sudo gem install nokogiri
ERROR:  could not find nokogiri locally or in a repository

$ sudo gem sources -a http://gems.github.com
Bulk updating Gem source index for: http://gems.github.com
Updating metadata for 1 gems from http://gems.rubyforge.org

$ sudo gem install nokogiri
ERROR:  could not find nokogiri locally or in a repository

$ sudo gem update --system
Updating RubyGems...
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.3.6
1 gem installed
Installing ri documentation for rubygems-update-1.3.6...
Installing RDoc documentation for rubygems-update-1.3.6...
Updating version of RubyGems to 1.3.6
Installing RubyGems 1.3.6
RubyGems 1.3.6 installed

$ sudo gem install nokogiri
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.4.2
1 gem installed
Installing ri documentation for nokogiri-1.4.2...
No definition for parse_memory
No definition for parse_file
No definition for parse_with
No definition for get_options
No definition for set_options
Installing RDoc documentation for nokogiri-1.4.2...
No definition for parse_memory
No definition for parse_file
No definition for parse_with
No definition for get_options
No definition for set_options

I’m not sure why I got those additional errors, however I was able to confirm a valid installation with.

$ irb

require ‘nokogiri’
=> true
quit

Tagged with: Open Source

Related Posts

Creating a More Realistic Benchmark

Common benchmark approaches fall into two general categories, synthetic testing and realistic testing. You have the most generic operations from a synthetic test, starting with the most simple example using a single table, a single column, and for a single DML operation.

Read more

Testing, Benchmarking, Evaluating

Testing and benchmarking are widely used terms in software technology, each serving a distinct purpose and goal. With the increasing adoption of AI in software development, the term evaluating has become significant and with this the re-emergence of what is quality assurance.

Read more

Your Attack Vector Extends Beyond Production Systems

A common data security issue is the unprotected copying of production data to non-production environments without any redaction, masking, or filtering. This practice poses a serious risk. A malicious actor will target the weakest link in your infrastructure, including non-production accounts and the developer systems accessing them.

Read more