这工作正常然后突然间没有。我希望我知道为什么。真的卡住了,在网上找不到任何东西。我正在研究一个ObjectiveC项目。我尝试用以下方法重置所有内容:
$ sudo gem uninstall ruby
$ sudo gem uninstall cocoapods
然后
$ sudo gem install ruby
$ sudo gem install cocoapods
$ sudo gem update ruby
$ sudo gem update cocoapods
然后我在我的项目目录中运行
$pod install
并收到以下错误。我在所有项目上得到了这个。
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require': cannot load such file -- cocoapods-core (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:8:in `<module:Pod>'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:4:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:23:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
非常感谢任何想法/线索/答案。
答案 0 :(得分:15)
我通过运行
重新安装了可可豆荚$ sudo gem uninstall cocoapods-core cocoapods-downloader cocoapods
$ sudo gem install cocoapods
这解决了我的问题
答案 1 :(得分:2)
您似乎错过了CocoaPod的依赖项之一。您应该可以使用以下命令安装它:
[sudo] gem install cocoapods-core