Cocoapods:'pod install'失败,Xcodeproj依赖于一个名为`fiddle`的库来读写Xcode项目文件

时间:2015-08-06 11:56:46

标签: ios ruby cocoapods rbenv

我刚从github下载了一个iOS / objective-c项目,该项目使用Cocoapods作为其依赖项。

当我在终端中尝试pod install时,我收到以下错误:

Updating local specs repositories
Analyzing dependencies
[!] Xcodeproj relies on a library called `fiddle` to read and write Xcode project files. Ensure your Ruby installation includes `fiddle` and try again.

所以我使用成功成功的gem install fiddle安装了小提琴,如果我现在执行gem list,则表明fiddle (0.6.3)已成功安装。另外我可以看到/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/fiddle-0.6.3/目录。

然而,当我尝试pod install时,我得到与以前完全相同的错误。

如果它有任何区别,我正在使用RBENV。

有人可以帮忙吗?我用谷歌搜索错误试图解决自己,但我得到的唯一结果是Cocoapods / Xcodeproj项目的源代码,它自己输出错误。

一些进一步的信息有助于:

which ruby
/Users/myname/.rbenv/shims/ruby

pod install --verbose
  Preparing

Updating local specs repositories

Updating spec repo `master`
  $ /usr/bin/git pull --ff-only
  From https://github.com/CocoaPods/Specs
     194b47f..be34c13  master     -> origin/master
  Updating 194b47f..be34c13
  Fast-forward
   .../0.1.2/Backgroundable.podspec.json              | 21 +++++++++++++++++
   .../1.0.0/ToolTipNavigation.podspec.json           | 27 ++++++++++++++++++++++
   2 files changed, 48 insertions(+)
   create mode 100644 Specs/Backgroundable/0.1.2/Backgroundable.podspec.json
   create mode 100644 Specs/ToolTipNavigation/1.0.0/ToolTipNavigation.podspec.json

Analyzing dependencies

Inspecting targets to integrate
[!] Xcodeproj relies on a library called `fiddle` to read and write Xcode project files. Ensure your Ruby installation includes `fiddle` and try again.


/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcodeproj-0.26.3/lib/xcodeproj/plist_helper.rb:7:in `rescue in <top (required)>'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcodeproj-0.26.3/lib/xcodeproj/plist_helper.rb:1:in `<top (required)>'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/xcodeproj-0.26.3/lib/xcodeproj/project.rb:7:in `<top (required)>'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer/target_inspector.rb:32:in `compute_results'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:655:in `block (2 levels) in inspect_targets_to_integrate'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:653:in `each'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:653:in `block in inspect_targets_to_integrate'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:652:in `inspect_targets_to_integrate'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:61:in `analyze'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:210:in `analyze'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:133:in `block in resolve_dependencies'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in `section'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:132:in `resolve_dependencies'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:in `install!'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:in `run'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
/Users/myname/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
/Users/myname/.rbenv/versions/2.2.0/bin/pod:23:in `load'
/Users/myname/.rbenv/versions/2.2.0/bin/pod:23:in `<main>'

1 个答案:

答案 0 :(得分:0)

我终于修好了。我安装了一个更新版本的红宝石,一切都很好。

(我不确定它是否真的是一个较新的版本,或者它是否只是一个新的安装分类的东西)

以下是我运行的命令以防万一...

brew update
brew upgrade rbenv ruby-build
rbenv install 2.2.2
rbenv global 2.2.2
rbenv rehash
gem install cocoapods
pod install