新手问题 Mac 安装 ruby install rails 问题

u1423287653 · 2015年11月12日 · 最后由 blackshow 回复于 2016年08月16日 · 2259 次阅读

按照 wifi 上安装,安装源液切换成淘宝了,一直提示这个鬼东西,关键 xcode-tools 已经安装了,网上说的各种方法都无效。跪了,求大神指点。 zhaoAllendeMacBook-Air:libiconv allen$ sudo gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.

/usr/local/opt/ruby/bin/ruby -r ./siteconf20151112-29736-jojk2y.rb extconf.rb checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no

Building nokogiri using packaged libraries.

The file "/usr/include/iconv.h" is missing in your build environment, which means you haven't installed Xcode Command Line Tools properly.

To install Command Line Tools, try running xcode-select --install on terminal and follow the instructions. If it fails, open Xcode.app, select from the menu "Xcode" - "Open Developer Tool" - "More Developer Tools" to open the developer site, download the installer for your OS

version and run it.

*** extconf.rb failed ***

到底有没有运行过 xcode-select --install 呢?

好吧 在公司网络用 app stores 安装了 code-tools 以为是可以的,然后到家游泳命令行装了一次,这次执行 gem install rails 可以了 长舒一口气 开始学习

xcode-select --install 到底是干什么用的啊,我也是一直安装不成功,运行了一下 xcode-select --install 就好了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号