0

这正在发生:

Mac:~ Swanros$ sudo gem install cocoapods
+Building native extensions.  This could take a while...
ERROR:  Error installing cocoapods:
    ERROR: Failed to build gem native extension.

    rake RUBYARCHDIR=/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext RUBYLIBDIR=/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext
/Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'rake' (>= 0) among 9 total gem(s) (Gem::LoadError)
    from /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
    from /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
    from /Users/Swanros/.rvm/gems/ruby-2.0.0-p247/bin/rake:22:in `<main>'


Gem files will remain installed in /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0 for inspection.
Results logged to /Users/Swanros/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/xcodeproj-0.14.0/ext/xcodeproj/gem_make.out
Mac:~ Swanros$ 

我怎么能解决这个问题?我正在运行已安装 Xcode 5 命令行工具的 OS X Mavericks。

4

2 回答 2

2

我刚刚发布了 xcodeproj 0.14.1,其中包含对此的修复:https ://github.com/CocoaPods/Xcodeproj/blob/0.14.1/CHANGELOG.md 。

如果您再试一次,它应该可以工作,或者您可以先安装 xcodeproj gem,然后再试一次:

$ sudo gem install xcodeproj
$ sudo gem install cocoapods
于 2013-11-02T01:16:10.437 回答
0

更新Xcode 5到Xcode 5.0.1后,cocoapods可以安装成功

于 2013-12-17T02:51:03.840 回答