简体   繁体   中英

How to remove XCode 4.2 and install 4.1 to develop Ruby / Rails on OSX Lion?

I develop Rails apps using RVM (ruby version manager).

I had to download XCode, in the app store I got only version 4.2.

Now RVM says that it can't build rubies properly with this XCode, so I followed this tutorial:

http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/

I downloaded the XCode version from the link that is shown when you type rvm requirements in the console. (https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg)

Now, there is a 3.09 GB .dmg with an installXCodeLion package, and it installs successfully, but after there is no XCode or whatsoever on my system. (I stopped also the iTunesHelper process... )

Anybody knows how to install XCode 4.1 ? Or where to officially get it from Apple? Or anybody uses RVM and ruby 1.9.2 w/ Rail 3.1 successfully on Lion?

Uninstall 4.2 with

/Library/Developer/4.2/uninstall-devtools --mode=all

Then XCode 4.1 Download is here

thanks a lot it is helpful

first:

Uninstall 4.2 with

/Library/Developer/4.2/uninstall-devtools --mode=all

secondly:

download xcode4.1 installed dmg file

run dmg file to install Xcode

be sure there is no "install Xcode" file in your "/application" directory

after running dmg file , one new "install Xcode" file will be created in "application" directory.

finally: run install Xcode to finish installation

Dont you have an "Install Xcode" application on your Applications folder ? I had to run it to complete the installation after executing the package from the xcode_4.1_for_lion.dmg

To retrieve Xcode 4.1, you have to log in to the Mac Dev Center and go to Additional Downloads . You will find all the installation disk images for all the Xcode versions.

I'll save you any additional trouble: Your rvm installation is out of date.

Reinstall Xcode 4.2, grab the latest rvm, and get back to your work with no fuss and no hoop-jumping.

Guillaume Petit is correct - delete Install Xcode from the APplications folder first (the 4.2 version from the App Store).

Run the xcode_4.1_for_lion.dmg again and it will create a new Install Xcode in Applications (which is the 4.1 version). Run that and Developer Tools will be installed as expected.

Im not sure if anyone is aware, but I read in another post that you have to use clang option to install rubies. example:

rvm install 1.9.2 --with-gcc=clang

The developer tools install in the "Developer" folder on your system disk. (not in the "Applications" folder!)

The old XCode releases can indeed be found on the Mac Dev Center download site.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM