I\'ve tried to install Nokogiri 1.6.1 under Ruby and RVM but is failing with the following error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build
I wrote a post on this after dealing with it myself. No need for homebrew.
There was a few issues I ran into, the first one being that the development tools cannot be found, and the second one that the libxml is too old.
Run the following commands in the rubyconsole:
$ sudo xcode-select -switch /Library/Developer/CommandLineTools
$ gem uninstall nokogiri libxml-ruby
$ gem install nokogiri