Skip to content

Instantly share code, notes, and snippets.

@vaiorabbit
Created November 24, 2014 06:21
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 vaiorabbit/c7a071de82d5afc59c9c to your computer and use it in GitHub Desktop.
Save vaiorabbit/c7a071de82d5afc59c9c to your computer and use it in GitHub Desktop.
Installing nokogiri gem for OS X 10.10 / Homebrew [2014-11-24]

Installing nokogiri gem for OS X 10.10 / Homebrew [2014-11-24]

I found some strings like

@@HOMEBREW_CELLAR@@/xz/5.0.7/lib

in libxml2's configuration log and Makefile. So I have to set these path strings explicitly via LZMA_* environment variables.

$ which ruby
/Users/foo/.rvm/rubies/ruby-2.1.5/bin/ruby

$ brew install xz
$ brew install libxml2
$ brew install libxslt

$ LZMA_CFLAGS="-I/usr/local/Cellar/xz/5.0.7/include" LZMA_LIBS="-L/usr/local/Cellar/xz/5.0.7/lib -llzma"   gem install nokogiri --verbose -- --with-xml2-config=/usr/local/Cellar/libxml2/2.9.2/bin --with-xslt-config=/usr/local/Cellar/libxslt/1.1.28/bin --with-lzma=/usr/local/Cellar/xz/5.0.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment