I know there are a lot of questions about this gem but no answer has worked for me.
When I run in SSH gem install nokogiri
I get this error:
<
This is what worked for me on OS X 10.10.3 Yosemite:
sudo gem install nokogiri -- --use-system-libraries --with-xslt-dir=/usr/local/opt/libxslt --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2 --with-xml2-lib=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib