从头开始重建mac.安装了xcode和rvm,然后试图安装rubies,但他们都给了我:

Error running ' ./configure --prefix=/Users/durrantm/.rvm/rubies/ruby-1.9.3-p125 
--enable-shared --disable-install-doc --with-libyaml 
--with-opt-dir=/Users/durrantm/.rvm/usr ', 
please read /Users/durrantm/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
Michaels-MacBook-Air:~ durrantm$ 

日志(log)包括:

checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/durrantm/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH

我需要gcc电脑吗?如何安装?

推荐答案

The critical step is actually installing the Xcode command line tools after the download completes and Xcode is installed

After downloading and installing Xcode from the app store, you need to actually install the command line tools it provides.
To do this open Xcode, go to preferences then downloads. There is an "Install" link to add the command line tools.

完成后,确保重新打开终端窗口.

Ruby相关问答推荐

为什么在if语句中的赋值操作不会在条件判断之前发生?

如何在 Ruby 中反转数字的字节顺序

类 SpecificationPolicy 的超类不匹配

如何判断一个对象在 Ruby 中是否可迭代?

如何在 Ruby 中生成一个包含 n 个唯一随机数的列表?

Sinatra 与 EventMachine WebSockets 一起工作是否成功?

Ruby 中的 Monad 类似功能

Ruby 中的 STDIN 和 $stdin 有什么区别?

ruby:对两个或多个数组的对应成员求和

检测安装的 CPU 数量

如何在不按 Enter 的情况下获取单个字符?

按键对哈希进行分组并对值求和

Ruby 设计模式:如何制作可扩展的工厂类?

如何在 Ruby 中创建可重用的块/proc/lambda?

在 OSX 10.10 Yosemite 上安装 Nokogiri

发现 Ruby 对象成员?

你怎么说不等于在 Ruby 中?

从数组 Ruby 中删除元素

如何在 Ruby 中对数组进行分块

Integer 和 Fixnum 有什么区别?