Cocoapods安装设置错误
嗨,大家好!
我正在尝试在我的mac中安装cocoapods但是我无法安装它,因为它显示以下错误
➜桌面$ sudo gem update –system
目前安装的最新版本。 中止。
➜桌面$ sudo gem install cocoapods已成功安装cocoapods-0.34.4已安装cocoapods-0.34.4 1 gem的解析文档
➜桌面$ pod设置 /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:315:in to_specs': Could not find 'cocoapods' (>= 0) among 200 total gem(s) (Gem::LoadError) Checked in 'GEM_PATH=/Users/(user name)/.rvm/gems/ruby-1.9.3-p374:/Users/vamshiraghu/.rvm/gems/ruby-1.9.3-p374@global', execute
gem env for more information from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in
to_spec’from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:58:在gem' from /usr/bin/pod:22:in
‘
所以有人知道这个错误要解决它吗?
我有同样的问题。 尝试不同的安装和卸载组合时,我遇到了不同的错误。 喜欢
[!] The `master` repo requires CocoaPods 0.32.1 -
要么
.rvm/gems/ruby-2.0.0-p598/gems/claide-0.4.0/lib/claide/command.rb:217:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
要么
.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121:in `require': cannot load such file -- colored (LoadError) from /Users/riverhuang/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121:in `require' from /Users/riverhuang/.rvm/gems/ruby-2.1.5@global/gems/cocoapods-0.36.2/lib/cocoapods/user_interface.rb:8:in `' from /Users/riverhuang/.rvm/gems/ruby-2.1.5@global/gems/cocoapods-0.36.2/lib/cocoapods/user_interface.rb:7:in `' . . . from /Users/riverhuang/.rvm/gems/ruby-2.1.5/bin/pod:23:in `load' from /Users/riverhuang/.rvm/gems/ruby-2.1.5/bin/pod:23:in `' Could not find proper version of cocoapods (0.29.0) in any of the sources Run `bundle install` to install missing gems.
清除了计算机中的所有gem后,我终于修复了它。 这是我清除所有gem的步骤。
gem uninstall --all sudo gem uninstall --all
卸载所有gem后,我重新安装了cocoapods。
sudo gem install cocoapods
然后重启终端并运行:
pod setup
我猜它在依赖gem中有冲突(错误的版本或不在正确的路径中)。 就像我运行“捆绑安装”一样,它总是安装cocoapods 0.29.0及其所有依赖项。 有和没有“sodu”安装gem及其依赖于版本0.36.2的不同地方,当我这样做。