I'm getting this error when installing eventmachine in one project, and therubyracer in another.
I tried re-installing Command Line Tools for XCode 6.3 but that didn't work.
I tried re-installing Ruby 2.1.5 but that didn't work.
Having re-read "Missing c++ header <__debug> after updating OSX Command Line Tools 6.3" I noticed that it said to reinstall the Command Line Tools for XCode 6.2. I've now done that and can successfully compile eventmachine and therubyracer gems.
Another Stack Overflow post, "Unable to install therubyracer on clean install of Yosemite and clean version of ruby", talks about the same problem but doesn't have an answer listed.