在Mac上安装Ruby on Rails失败了

时间:2013-03-15 10:48:27

标签: ruby-on-rails macos install rvm

我第一次尝试在Mac上安装Ruby on rails。

我在终端窗口上运行了以下命令 -

rvm install 2.0.0

但我一直收到这个错误。

Error running './configure --prefix=/Users/tusharmathur/.rvm/rubies/ruby-2.0.0-p0 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libxml2:/usr/local/opt/libxslt:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/tusharmathur/.rvm/log/ruby-2.0.0-p0/configure.log
There has been an error while running configure. Halting the installation.

我也看到了configure.log,这里是信息 -

[2013-03-15 01:11:06] ./configure
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin12.2.1
checking host system type... i386-apple-darwin12.2.1
checking target system type... i386-apple-darwin12.2.1
checking whether the C compiler works... no
configure: error: in `/Users/tusharmathur/.rvm/src/ruby-2.0.0-p0':
configure: error: C compiler cannot create executables
See `config.log' for more details

1 个答案:

答案 0 :(得分:5)

以下是一些如何为XCode安装命令行工具的截图(您可以从Mac AppStore安装XCode):

  1. http://d.pr/i/YJJp
  2. http://d.pr/i/ntLu
  3. http://d.pr/i/cOFv
  4. 安装命令行工具后,您的计算机上将有一个C / C ++编译器。