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
Github Answer
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
bundle install
I had a similar issue with 1.6.7.2 when bundle installing on codeship with ruby 2.3.
What worked for me was adding:
bundle config build.nokogiri --use-system-libraries
before
bundle install
Run these commands:
gem uninstall nokogiri
xcode-select --install
gem install nokogiri
source: http://www.nokogiri.org/tutorials/installing_nokogiri.html#mac_os_x
sometimes mac updates can break xcode CLI so reinstalling can fix the issue: https://github.com/sparklemotion/nokogiri/issues/1445
Try this
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
And then install Nokogiri
sudo gem install nokogiri
If nothing above works,
Try deleting Gemfile.lock, and do reinstalling of gems.
Deleting nokogiri in rbenv gem folder and reinstalling solved it for me.