Skip to content

Instantly share code, notes, and snippets.

@jkereako
Created March 7, 2015 05:38
Show Gist options
  • Save jkereako/74aac2040a3e9d83e9a4 to your computer and use it in GitHub Desktop.
Save jkereako/74aac2040a3e9d83e9a4 to your computer and use it in GitHub Desktop.
Installing Nokogiri 1.6.6.2 on OS X 10.10.2 (Yosemite) with Clang 6.0
# If you don't have libxml2 installed, download the source and compile it. It's easy.
sudo gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2
@jkereako
Copy link
Author

Description

This is the command you must use if you want to install Nokogiri manually on OS X Yosemite using Yosemite's built in version of Ruby.

HOWEVER, I strongly recommend you abandon this method and install rbenv and the rbenv plugin ruby-build and use a Ruby version which is compatible with Nokogiri.

I wasted hours trying to install Nokogiri using Yosemtie's built-in Ruby version. Then I gave up and installed rbenv. Originally, I had resisted rbenv because I assumed it was just like RVM. I've used RVM in the past and hated it with a burning passion. To use RVM, you need to read 100 page manual and you'll still run into compatibility issues resulting in hours of Googling. rbenv is NOTHING like RVM. It's simple!

tldr; ignore this Gist and install rbenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment