Julian Popov Julian Popov - 1 year ago 149
Ruby Question

Installing nokogiri on Mac OS Sierra 10.12

I'm having troubles installing

( on Mac OS Sierra 10.12

I tried using
brew install libxml2 libxslt
and then referencing install directories using command line options but it doesn't helped

Answer Source

Open XCode and from the app menu XCode -> Preferences update you Command Line Tools (Xcode 8.0) then...

bundle config build.nokogiri --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2

bundle install

or just

gem install nokogiri -v -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download