RVM Ruby / Brew安装问题

时间:2013-03-06 19:47:49

标签: ruby-on-rails ruby homebrew

当我尝试在运行OSX 10.8.2的Mac Mini上安装ruby或brew时,我遇到了这个问题:

$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p392.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx/10.8/x86_64, might require sudo password
Skipping `brew update` make sure your formulas are up to date.
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 21: /usr/local/Library/brew.rb: Undefined error: 0

我不确定发生了什么。我应该重新安装XCode来清理我的框架吗?

出了什么问题,我该如何解决?如果以前曾经问过这个问题我很抱歉,但谷歌和symbolhound都没有找到错误的结果。

2 个答案:

答案 0 :(得分:1)

sudo rvm install 1.9.3。这应该可以解决你的问题。

答案 1 :(得分:1)

问题源于我安装Ruby。显然,正如in this answer所述,“GCC的非LLVM版本”不再包含在XCode命令行工具中。

使用以下方法安装ruby:

rvm install ruby --with-gcc=clang

工作和我在大约10分钟内安装了RVM,Ruby和Rails,尽管我花了一周时间进行调试并重新安装。