10

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.

2
  • 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... Nov 3, 2011 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? Nov 3, 2011 at 21:45

5 Answers 5

3

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.

0
8

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 https://developer.apple.com/downloads/index.action.

Finally I had to call

 xcode-select -switch /Applications/Xcode.app
1

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.

0

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
0

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

You must log in to answer this question.

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