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