After upgrading from my 2009 MBP to a 2012' Mac Mini with the awesome 'Migration' tool I found myself pretty much in the same environment as before.
The only thing not working as expected was the failing bundle command. (on the nokogiri gem). Somehow my
homebrew folders had some wrong permissions after the migration. I fixed that by reinstalling it but the gem wouldn't get built. Well turns out a "simple"
$ gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
left me with the note, that "libxml/parser.h" wasn't found.
I still can't wrap my head around this. But apparently it has something to to with the XCode Command Line Tools. (For not being gcc 4-something ).
This came to the rescue:
$ brew tap homebrew/dupes $ brew install apple-gcc42 $ sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2
Running gem install nokogiri or in my case the bundle command works like a charm.
Thx to: Deployment Zone