Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to installed Ruby using Homebrew, the OSX package manager.

When I run 'brew install ruby' I keep getting the message 'Warning: XCode is not installed!'. XCode is installed, it's lying.

Is there anything I can try to fix this? I'm running Lion with XCode 3.2.6.

share|improve this question
I'm not really looking to use any of the new XCode stuff tho... It's not like Homebrew had a dependency on XCode 4... – Jaco Pretorius Nov 3 '11 at 19:57
@slhck - turns out you were right. Upgrading to XCode 4 solved it. So I guess the actual bug here is that the error message is incorrect - it should say something like 'Warning: You are using an outdated version of XCode'. If you post that as the answer I'll accept? – Jaco Pretorius Nov 3 '11 at 21:45
up vote 3 down vote accepted

According to the Homebrew Wiki, you need to use an Xcode version ≥ 4.1 when running OS X Lion.

They actually say …

Note that using an XCode older than 4.1 on 10.7 may cause build errors.

… but the "warning" message is probably misleading. Try updating Xcode to the latest version via the Mac App Store.

share|improve this answer
Thanks for your help – Jaco Pretorius Nov 3 '11 at 22:03

Homebrew does not work out of the box with XCode 4.3. You also need to install the Command Line Tools for Xcode.

You can do this by starting XCode and going to Preferences->Downloads->Command Line Tools and click on install. Or get them mannually from

Finally I had to call

 xcode-select -switch /Applications/
share|improve this answer

You might also try a reboot after installing Xcode.

I was having this problem too (Brew claiming xcode wasn't installed), running 10.7. I had removed Xcode 4.1 and used the app store to install Xcode 4.2, so it was definitely up to date. I manually added /Developer/usr/bin to my path, which didn't help. But a reboot did.

share|improve this answer

Add the following directory to your path, by adding this line to your ~/.bash_profile:

export PATH=$PATH:/Developer/usr/bin:/Developer/usr/local/bin
share|improve this answer

What worked for me was simply to start the XCode app and click "OK" on "Start using XCode"...

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .