Cocoapods与Xcode 5和10.10 Yosemite

时间:2014-07-14 00:02:16

标签: xcode xcode5 cocoapods osx-yosemite osx-yosemite-beta

在最初升级到10.10和XCode6-Beta之后,我尝试运行'pod update'并收到此错误:

cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)

我尝试使用'sudo gem install cocoapods'更新Cocoapods,但收到了另一个错误:

Fetching: xcodeproj-0.17.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing cocoapods:
ERROR: Failed to build gem native extension.

"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext RUBYLIBDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** 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.

即使我已安装XCode 6,我也希望此时使用XCode 5,因为我想发布。

相关:Cocoapods with Xcode 6 and 10.10 Yosemite

2 个答案:

答案 0 :(得分:0)

您需要重新安装cocoapod gem并使用XCode6的命令行工具,由this回答指定。 然后你可以进行pod安装并继续使用XCode5。 只需打开在XCode5中创建的xcworkspace而不是XCode6Beta。

答案 1 :(得分:0)

只需删除〜/ .rvm文件夹即可解决ruby / library版本,ACL和配置冲突引起的问题。所有的宝石都必须重新安装,但这是我所知道的最简单,最干净的解决方案,适用于Xcode 5.运行

> sudo rm -rf ~/.rvm

in s.hell。