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

Why Being Proactive Is Always a Winning Approach

Many companies manage production infrastructure using a reactive model rather than a proactive one. Organizations typically react to warnings and alerts, then implement corrective actions in response. While some companies have well-designed architectural patterns—such as feature flags and rate limiting—that can quickly mitigate the impact of issues, these are merely temporary solutions, not resolutions.

Read more

AWS CLI support for Aurora DSQL and S3 Tables

If you were following the AWS Re:invent keynote yesterday there were several data specific announcements including Aurora DSQL and S3 Tables . Wanting to check them out, I downloaded the latest AWS CLI 2.

Read more

Migrating off of WordPress - A Simplified Stack

The ongoing drama between Wordpress v WP Engine continues to cross my reading list, but I have permanently removed WordPress from my website. I have finally transitioned away from the complex Linux/Apache/MySQL/PHP (LAMP) stack required for self-hosting WordPress on my professional website.

Read more