Julian Popov Julian Popov - 1 month ago 33
Ruby Question

Installing nokogiri on Mac OS Sierra 10.12

I'm having troubles installing

nokogiri
(1.6.8.1) 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

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 1.6.8.1 -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2
Comments