Skip to content

Instantly share code, notes, and snippets.

@johnsome
Forked from fabioyamate/nokogiri
Created April 19, 2011 17:36
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 johnsome/928960 to your computer and use it in GitHub Desktop.
Save johnsome/928960 to your computer and use it in GitHub Desktop.
nokogiri installation from libxml2 and libxslt mac osx snow leopard
http://nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x
# using rvm with ruby-1.8.7-tv1_8_7_174
# latest version 2.7.7 2010-06-17
brew install libxml2
brew link libxml2 (FAILS) - so have to include below
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
make
sudo make install
# installing nokogiri with this new compiled libs
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.7/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.7/lib --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