Homebrew has blacklisted libiconv so the majority of your help via google will not work now.
Here's a way I figured out how to get nokogiri to compile if you made the mistake of upgrading your XCode version
- Install packages via homebrew
brew update
brew install libxml2
brew install libxslt
- Tell bundler how to build this by default
Note that the version in the path there must match the installed version in your homebrew. If in doubt, run the command
brew info libxml2
orbrew info libxslt
to find out which version you have installed.
bundle config build.nokogiri --with-xml2-include=$HOMEBREW_HOME/Cellar/libxml2/2.9.0/include/libxml2 --with-xml2-lib=$HOMEBREW_HOME/Cellar/libxml2/2.9.0/lib --with-xslt-dir=$HOMEBREW_HOME/Cellar/libxslt/1.1.28
- If you have nokogiri installed already, remove it
gem uninstall nokogiri
- Bundle again to install
bundle install
😺