I always worked my way around Nokogiri installation issues by following the documentation in the \"Installing Nokogiri\" tutorial.
But this time, even after installi
At macOS none of above/below had really worked for me until I explicitly provided XCode libxml2 path to --with-xml2-include
.
gem install nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 --use-system-libraries
For OSX users, if you've had success installing Nokogiri before, yet are getting errors installing it on, say, using a new version of Ruby that you've added and that error that includes a message like:
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
This could be indicative of a XCode upgrade having happened via the App Store, either manually or automatically, and you not having opened it since that time.
If so, you should be able to open XCode, agree to the new license, and then install Nokogiri successfully.
Was able to install vagrant-awe by following the above post but using the command as follow:
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-aws
You usually need development files for building gems. Try:
sudo apt-get install libxslt-dev libxml2-dev
(I just saw that Eric suggested the same in a comment.)
You may actually need to install both of these packages
sudo apt-get install libxslt-dev libxml2-dev
I was able to install Nokogiri 1.6.5 on Fedora 20 by doing:
export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
Then running:
gem install nokogiri