在Mac上安装Ruby on Rails失败 [英] Installing Ruby on Rails on Mac is failing

查看:143
本文介绍了在Mac上安装Ruby on Rails失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试第一次在Mac的Rails上安装Ruby.

I am trying to install Ruby on rails on my Mac for the first time.

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

I ran the following command on my terminal windows -

rvm install 2.0.0

但是我一直收到此错误.

But I keep getting this error.

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,这是信息-

I saw the configure.log also, here is the information -

[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

推荐答案

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

Here are some screenshots how to install command line tools for XCode (you can install XCode from Mac AppStore):

  1. http://d.pr/i/YJJp
  2. http://d.pr/i/ntLu
  3. http://d.pr/i/cOFv
  1. http://d.pr/i/YJJp
  2. http://d.pr/i/ntLu
  3. http://d.pr/i/cOFv

安装命令行工具后,您的计算机上将具有C/C ++编译器.

After installing command line tools you will have a C/C++ compiler on your machine.

这篇关于在Mac上安装Ruby on Rails失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆