我已经被困在这个问题上几个小时了,我找不到解决方案.我正在运行Mavericks并安装了Xcode 5.0.2(随命令行工具一起提供).
我的环境:
使用RVM与ruby版本1.9.3p484
Xcode 5.0.2
Mac OS 10.9.1
宝石2.2.0
Bundler版本1.3.5
Sudo gem安装cocoapods输出
kyles-mbp-2:fresh-driver-ios kylechronis$ sudo gem install cocoapods Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. /Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -rubygems /Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/rake- 0.9.2.2/bin/rake RUBYARCHDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3- p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1 RUBYLIBDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1 /Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb checking for -std=c99 option to compiler... yes checking for CoreFoundation... no checking for main() in -lCoreFoundation... no CoreFoundation is needed to build the Xcodeproj C extension. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
这是CoreFoundation无法找到的问题吗?或者使用不同版本的Ruby?任何帮助或输入将不胜感激.
安装新的Ruby版本帮助了我.跟着这些步骤
rvm reinstall ruby-2.0.0-p247 --with-gcc=clang --verify-downloads 1 gem install xcodeproj gem install cocoapods
我在一些旧的Github问题中找到了这个答案.