Skip to content

Instantly share code, notes, and snippets.

@yrstruly
Created January 8, 2012 20:31
Show Gist options
  • Save yrstruly/1579570 to your computer and use it in GitHub Desktop.
Save yrstruly/1579570 to your computer and use it in GitHub Desktop.
Getting XCode 4.2 to work with HomeBrew, ruby-build on a fresh install
Recently I've reinstalled OS X Lion on a clean HDD, after having installed XCode 4.2
through the App Store I've ran into a lot of problems when I tried to use HomeBrew
(http://mxcl.github.com/homebrew/) or ruby-build (https://github.com/sstephenson/ruby-build).
This is a know problem see: https://github.com/mxcl/homebrew/issues/6852 or
https://github.com/sstephenson/ruby-build/issues/62.
* the problem is that (so for as I understand it) XCode 4.2 includes only the llvm-gcc
compiler while homebrew/ruby-build depend (partially) on gcc (non-llvm) *
But finally I've got it working. Here are the steps I took:
- First, install Xcode 4.1 for OS X Lion, you can download it here:
https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg
Actually, this installs an 'Install Xcode' (sic) to your /Applications folder,
clicking on this will actually install Xcode 4.1.
So, now you have a working system where both homebrew & ruby-build are happy,
but you'll want the latest version of Xcode (4.2 at the time of writing) also, no?
Well, now you can install Xcode throught the App Store.
First you'll need to remove the 'Install Xcode' from your /Applications folder.
Then you can select Xcode from the App Store.
Once again this only installs an installer 'Install Xcode' in your /Applications.
Click this to actually install Xcode 4.2.
After having done this, you'll have the latest version of Xcode,
while homebrew and ruby-build are happy.
Credits go out to rvm (http://rvm.beginrescueend.com) for the link to Xcode 4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment