Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Xcode 4.6 on Lion, needed for upgrading ruby with RVM

I was actually trying to update ruby on my OSX 10.7.5 with RVM, and after typing in the following command:

rvm install ruby

I got the following response:

Searching for binary rubies, this might take some time.
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.0.0-p247',
please read /Users/username/.rvm/log/1381215459_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.

Then, when I checked out the update_system.log, it showed me the actual code of a function called requirements_osx_brew_update_system(), which contained the following error message:

Xcode version older than 4.6.2 installed, download and install newer version from:

    http://connect.apple.com

After installation open Xcode, go to Downloads and install Command Line Tools.

Then I proceeded to find an update for Xcode, but only found the latest Xcode 5.0, which is apparently incompatible with my OSX 10.7. Although ultimately my goal is to update ruby and install rails, which I'm sure there are many other ways to do, I'd still like to find out if I could possibly install Xcode 4.6.2 on my OSX 10.7.

like image 594
gokeji Avatar asked Oct 08 '13 07:10

gokeji


2 Answers

UPDATE: Sorry folks, apparently my version of XCode is v4.6.1 so updating the command line tools will not work in all cases (I know for a fact it doesn't work if you're on XCode v4.3.3). YMMV

I ran into the same issue trying to do an rvm install. I got an error telling me that I needed XCode 4.6.2 or later.

Turns out all it needed was the latest version of the XCode command line tools. I followed the instructions for upgrading my command line tools from this macports article:

  • open the Xcode application
  • go to the Preferences window
  • open the Downloads section
  • click the Install button next to "Command Line Tools"

After doing this I was able to run my rvm install command and it didn't complain about upgrading XCode anymore (and finished successfully).

like image 153
plainjimbo Avatar answered Sep 18 '22 15:09

plainjimbo


It seems you're going to have to install under Xcode 5. So go to https://developer.apple.com/downloads/ and log in with your developer ID to get to the older versions. There should be a 4.6.3 that you could potentially download, or even 4.6.2.

Or you could upgrade your OSX to 10.8.

Whichever you prefer.

I can't give you a direct link to it, since you need your developer information to log in yourself. But all the downloads you need are in the link provided above once you log in.

like image 26
jamby Avatar answered Sep 20 '22 15:09

jamby