Skip to content

Instantly share code, notes, and snippets.

@asmallteapot
Created May 19, 2017 20:42
Show Gist options
  • Select an option

  • Save asmallteapot/705906ad56c457522404f9ee1aeb02bd to your computer and use it in GitHub Desktop.

Select an option

Save asmallteapot/705906ad56c457522404f9ee1aeb02bd to your computer and use it in GitHub Desktop.
Building nokogiri on macOS Sierra using bundler and homebrewed libxml2
source 'https://rubygems.org'
gem 'nokogiri'
# install libxml2 with homebrew
brew install libxml2
# configure bundler to use homebrew's libxml2 when building nokogiri
bundle config build.nokogiri --use-system-libraries --with-xml2-include=$(brew --prefix libxml2)/include/libxml2
# install nokogiri via bundler
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment