Skip to content

Instantly share code, notes, and snippets.

@gretel
Last active October 12, 2015 11:16
Show Gist options
  • Save gretel/360872d0145797137303 to your computer and use it in GitHub Desktop.
Save gretel/360872d0145797137303 to your computer and use it in GitHub Desktop.
on osx, install nokogiri gem can be tricky due to issues. so this does the job fine for me. mind version numbers, might change due to fresh brew.
#!/bin/sh
# https://gist.github.com/gretel/360872d0145797137303
# # install homebrew
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# brew doctor
brew update
brew unlink libxml2 libxslt
brew uninstall libxml2 libxlt
brew install libxml2 libxslt
# mind version numbers
gem install nokogiri -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment