【发布时间】:2013-11-13 18:41:52
【问题描述】:
我正在使用 Rails 3.2.12 运行 OS X Mavericks。当我尝试做 rails new project 时,它卡在 bundle install 中。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
make: gcc-4.2: No such file or directory
make: *** [generator.o] Error 1
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/json-1.8.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p392/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
当我按照它的建议执行“gem install json....”时,我得到了同样的错误。我已经使用命令行工具安装了最新版本的 Xcode。当我这样做时:
which gcc
我明白了:
/usr/bin/gcc
我对所有这些东西真的很陌生,所以请尽量保持简单。
【问题讨论】:
标签: ruby-on-rails json gcc gem osx-mavericks