Skip to content

Instantly share code, notes, and snippets.

@jney
Forked from retr0h/gist:1001477
Created September 20, 2011 14:08
Show Gist options
  • Save jney/1229160 to your computer and use it in GitHub Desktop.
Save jney/1229160 to your computer and use it in GitHub Desktop.
RVM + HomeBrew + Nokogiri
#!/bin/sh
##
# to install :
# $ curl -L "https://gist.github.com/gists/path/to/raw/gist/nokogiri.sh" | sh
set -e
echo "installing libraries"
brew install libxml2
brew install libxslt
brew install libiconv
echo "linking libraries"
brew link libxml2
brew link libxslt
brew link libiconv
echo "installing gem"
gem install nokogiri -- --with-xml2-include="$(brew --prefix libxml2)/include/libxml2/" \
--with-xml2-lib="$(brew --prefix libxml2)/lib/" \
--with-xslt-include="$(brew --prefix libxslt)/include/libxslt/" \
--with-xslt-lib="$(brew --prefix libxslt)/lib/" \
--with-iconv-include="$(brew --prefix libiconv)/include/" \
--with-iconv-lib="$(brew --prefix libiconv)/lib/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment