xcrun: Error: failed to exec real xcrun. (No such file or directory)
I had the same problem. Originally I was doing the following for my xcode-switch:
$ sudo xcode-select -switch /Applications/Xcode.app/
However what was really needed was:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/
This fixed the problem for me. Not sure if sudo is needed.
The only fix is hack apparently. I tried the script mentioned and it worked
OSX 10.8 xcrun (No such file or directory)