如何删除 XCode 4.2 并安装 4.1 以在 OSX Lion 上开发 Ruby / Rails?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7873991/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove XCode 4.2 and install 4.1 to develop Ruby / Rails on OSX Lion?
提问by tmaximini
I develop Rails apps using RVM (ruby version manager).
我使用 RVM(ruby 版本管理器)开发 Rails 应用程序。
I had to download XCode, in the app store I got only version 4.2.
我不得不下载 XCode,在应用商店我只有 4.2 版。
Now RVM says that it can't build rubies properly with this XCode, so I followed this tutorial:
现在 RVM 说它不能用这个 XCode 正确构建红宝石,所以我跟着这个教程:
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)
我从您rvm requirements
在控制台中键入时显示的链接下载了 XCode 版本。(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... )
现在,有一个带有 installXCodeLion 包的 3.09 GB .dmg,它安装成功,但在我的系统上没有 XCode 或任何东西之后。(我也停止了 iTunesHelper 进程......)
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?
有人知道如何安装 XCode 4.1 吗?或者从哪里正式从Apple获得它?或者有人在 Lion 上成功使用 RVM 和 ruby 1.9.2 w/ Rail 3.1?
采纳答案by colinm
I'll save you any additional trouble: Your rvm installation is out of date.
我会为您省去任何额外的麻烦:您的 rvm 安装已过期。
Reinstall Xcode 4.2, grab the latest rvm, and get back to your work with no fuss and no hoop-jumping.
重新安装 Xcode 4.2,获取最新的 rvm,然后继续工作,无需大惊小怪。
回答by dB.
回答by hzizh
thanks a lot it is helpful
非常感谢它很有帮助
first:
第一的:
Uninstall 4.2 with
卸载 4.2
/Library/Developer/4.2/uninstall-devtools --mode=all
/Library/Developer/4.2/uninstall-devtools --mode=all
secondly:
其次:
download xcode4.1 installed dmg file
下载 xcode4.1 安装的 dmg 文件
run dmg file to install Xcode
运行 dmg 文件安装 Xcode
be sure there is no "install Xcode" file in your "/application" directory
确保“/application”目录中没有“install Xcode”文件
after running dmg file , one new "install Xcode" file will be created in "application" directory.
运行 dmg 文件后,将在“应用程序”目录中创建一个新的“安装 Xcode”文件。
finally: run install Xcode to finish installation
最后:运行 install Xcode 完成安装
回答by Guillaume Petit
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
您的应用程序文件夹中没有“安装 Xcode”应用程序吗?从 xcode_4.1_for_lion.dmg 执行包后,我必须运行它才能完成安装
回答by Laurent Etiemble
To retrieve Xcode 4.1, you have to log in to the Mac Dev Centerand go to Additional Downloads. You will find all the installation disk images for all the Xcode versions.
要检索 Xcode 4.1,您必须登录Mac Dev Center并转到其他下载。您将找到所有 Xcode 版本的所有安装磁盘映像。
回答by Michael Shimmins
Guillaume Petit is correct - delete Install Xcode from the APplications folder first (the 4.2 version from the App Store).
Guillaume Petit 是正确的 - 首先从应用程序文件夹中删除安装 Xcode(App Store 中的 4.2 版本)。
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.
再次运行 xcode_4.1_for_lion.dmg,它将在应用程序中创建一个新的安装 Xcode(这是 4.1 版本)。运行它,开发人员工具将按预期安装。
回答by leeghwrd
Im not sure if anyone is aware, but I read in another post that you have to use clang option to install rubies. example:
我不确定是否有人知道,但我在另一篇文章中读到您必须使用 clang 选项来安装红宝石。例子:
rvm install 1.9.2 --with-gcc=clang
回答by Jeroen Jacobs
The developer tools install in the "Developer" folder on your system disk. (not in the "Applications" folder!)
开发人员工具安装在系统磁盘上的“Developer”文件夹中。(不在“应用程序”文件夹中!)
The old XCode releases can indeed be found on the Mac Dev Center download site.
旧的 XCode 版本确实可以在 Mac Dev Center 下载站点上找到。