Skip to content

Instantly share code, notes, and snippets.

@retr0h
Created May 31, 2011 23:14
Show Gist options
  • Select an option

  • Save retr0h/1001477 to your computer and use it in GitHub Desktop.

Select an option

Save retr0h/1001477 to your computer and use it in GitHub Desktop.
RVM + HomeBrew + Nokogiri
BREW_HOME=$HOME/.homebrew
$ brew install libxml2
$ brew link libxml2
$ brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/libxslt.rb
$ brew link libxslt
$ brew install libiconv
$ brew link libiconv
$ gem install nokogiri -- --with-xml2-dir=$BREW_HOME/Cellar/libxml2/2.7.8 --with-xslt-dir=$BREW_HOME/Cellar/libxslt/1.1.26 --with-iconv-dir=$BREW_HOME/Cellar/libiconv/1.13.1/
@tylergannon

Copy link
Copy Markdown

Worked for me. Be sure to manually install all versions of nokogiri that your Gemfile might call for, so that they will be compiled with the right lib locations.

@timsegraves

Copy link
Copy Markdown

This solved my libxml2 issues as well. Thanks!

@retr0h

retr0h commented Aug 14, 2011

Copy link
Copy Markdown
Author

@davidrupp

Copy link
Copy Markdown

Helped me too. Thanks!

@joelcdoyle

Copy link
Copy Markdown

404 not found for line 5

@nilbus

nilbus commented Oct 21, 2014

Copy link
Copy Markdown

Replace line 5 with

brew install libxslt

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