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

u1423287653 · November 12, 2015 · Last by blackshow replied at August 16, 2016 · 2259 hits

按照 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 就好了

You need to Sign in before reply, if you don't have an account, please Sign up first.