Gem gem install 安装报错,已安装 xcode

cdredfox · 2012年04月14日 · 最后由 cdredfox 回复于 2012年05月28日 · 3872 次阅读

Hi,各位

我在我的机器上安装了 xcode,可是为什么用 gem install 或者 bundle update 在安装某些 gem 的时候还是会报:

: The complier failed to generate an executable file. (RuntimeError) You have to install development tools first.

请问大家有碰到过这样的情况吗?可以怎么解决呢?谢谢。 我的环境是: xcode:4.3.2(通过 appstore 安装) ruby:1.9.3 os:lion

xcode 4.3.2 已经不是 installer 形式发布的了,那些 devtool 要单独安装的了

刚刚去网站确认了下,确实是单独安装的了 https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-

你可以试试 xcode-select 命令,切换到正确的 xcode path

单独安装后,就好了~

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