Skip to content

Instantly share code, notes, and snippets.

@rriveras
Created August 5, 2011 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rriveras/1127824 to your computer and use it in GitHub Desktop.
Save rriveras/1127824 to your computer and use it in GitHub Desktop.
Quick way to install nokogiri and dependencies in OSX Snow Leopard
# installation of libxml 2.7.7 or later
brew install libxml2
brew link libxml2
# install libxslt from source
# download the source
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
# unzip the source
tar -zxvf libxslt-1.1.26.tar.gz
# move to the unzipped folder
cd libxslt-1.1.26
# Now, we finally compile!
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 \
--with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
make
sudo make install
# install de gem using the source we just installed
sudo gem install nokogiri -- --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment