我和这篇帖子基本上有同样的问题:when running pod install I get The `master` repo requires CocoaPods 0.32.1, try updating but still in 0.31但答案对我没有帮助(我不允许对事情发表评论哈哈!)
我尝试运行'pod install'或'pod setup',我收到错误消息:
[!] The `master` repo requires CocoaPods 0.32.1 -
Update CocoaPods, or checkout the appropriate tag in the repo.
/Library/Ruby/Gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:281:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:274:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/command.rb:51:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
然后我运行'sudo gem install cocoapods',然后我得到:
CHANGELOG:
## 0.32.1
##### Bug Fixes
* Fixed the Podfile `default_subspec` attribute in nested subspecs.
[Fabio Pelosin][irrationalfab]
[#2050](https://github.com/CocoaPods/CocoaPods/issues/2050)
Successfully installed cocoapods-0.32.1
Parsing documentation for cocoapods-0.32.1
Done installing documentation for cocoapods after 1 seconds
1 gem installed
即使在此之后,我运行'pod --version',我仍然得到0.31.1。我需要采取另一个步骤来成功更新到0.32.1吗?
答案 0 :(得分:30)
更新:必须在sudo gem uninstall cocoapods
然后sudo gem install cocoapods
成功更新到最新版本。
答案 1 :(得分:9)
运行pod --version
和sudo pod --version
- 我想有多个版本已经安装了sudo和没有sudo。要么更新两者,要么使用[sudo] gem uninstall cocoapods
答案 2 :(得分:4)
首先尝试卸载gem:
sudo gem uninstall cocoapods
然后再次安装:
sudo gem install cocoapods
然后pod --version
应该显示最新的。
答案 3 :(得分:1)
对我来说,问题是由安装了两个版本的cocoapod引起的。
我首先通过运行sudo gem uninstall cocoapods
卸载了cocoapod。
然后运行pod --version
命令再次检查cocoapods的存在。
奇怪的事情发生了!宝石就在那里。 所以我第二次卸载了cocoapods。
我的结论是确保您完全删除所有cocoapods,然后重新安装。它对我有用。
答案 4 :(得分:1)
我正在使用捆绑包,因此Microsoft SQL server
适用于我。
答案 5 :(得分:0)
最终对我有用的是......
- sudo gem uninstall cocoapods
- Restart the Terminal ( on your Mac)
- sudo gem install cocoapods --source http://rubygems.org
另外,更好的复制粘贴,容易用Cocoapods做错字: - )