Brew and gcc on OSX Yosemite

A screenshot of Brew hiccuping up on Yosemite due to Xcode

You're excited. You just installed OSX Yosemite. You start to set up your development environment. You run the usual brew install commands, and suddenly, you start getting errors like:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Or perhaps,

Warning: Your Xcode (5.1) is outdated
Please update to Xcode 5.1.1.

This is annoying, because you cannot install Xcode from the App Store on Yosemite. To get around this, navigate to the Xcode downloads page and grab the Xcode 6.4 beta. You may be asked to login to your developer account. Even if you're not a registered developer, do it anyway. The download should start without a hitch.

Once it finishes, install the Xcode 6.4 beta, then run:

sudo xcode-select -s /Applications/

Brew should now be able to compile correctly. If not, drop me a note in the comments and I'll try to help out, as I have it working on my machine now.