I try to clone this repo and run bundle install
. The bundle process failed and throw this error:
...
Installing nokogiri 1.6.2.1 with na
I had same issue while updating to xcode 10, I resolved it with following steps :
If you're using bundle:
brew install libxml2
# If using Bundle
bundle config build.nokogiri --use-system-libraries \
--with-xml2-include=$(brew --prefix libxml2)/include/libxml2
bundle install
from http://www.nokogiri.org/tutorials/installing_nokogiri.html
I did everything in the other answers, but had to do one more thing:
Spencer's answer worked for me, but I also needed to use the -n parameter to overcome the permission issue documented here.
So in the end, the command that worked for me was:
gem install -n /usr/local/bin nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 --use-system-libraries
This helped me fix this
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
ref: https://stackoverflow.com/a/17980786/3861525
It may also be an issue with the anaconda version of some of the libs.
$ conda deactivate
$ gem uninstall nokogiri
$ gem install nokogiri
$ conda activate base
worked for me.