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.

5 Answers5

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
BetaRide
  • 2,359
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.

slhck
  • 235,242
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
slhck
  • 235,242
fijiaaron
  • 121
0

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

xpmatteo
  • 97
  • 2