I just updated my Macbook to Mountain Lion, but now I\'m not able to install some gems, because of the below error about headers. I looked around and it seems to have to do
I was able to get things working by just installing "Command Line Tools 10.8 for Xcode - Late July 2012" (not XCode itself) from:
https://developer.apple.com/downloads/index.action
(Follow the "View all downloads" link from the Mac Dev Center page)
FYI, I did not have XCode installed on Lion, just the "Command Line Tools". Not sure if the new XCode command line tools will play nice with the old XCode.
Be sure to install Xcode's Command-Line Tools.
This hint helped me with this issue:
sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2