Get Mountain Lion and Homebrew to Be Happy
1) Install XCode 4.4 into /Applications
Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.
2) Install Command Line Tools
In XCode's Preferences > Downloads you can install command line tools.