Cocoapods安装设置错误 [英] Cocoapods installation setup error
问题描述
大家好!
我正在尝试在我的mac中安装cocoapods但是我无法得到它安装,因为它显示以下错误
➜桌面$ sudo gem update --system
目前安装的最新版本。
正在中止。
Latest version currently installed. Aborting.
➜桌面$ sudo gem install cocoapods
已成功安装cocoapods-0.34.4
cocoapods的解析文档-0.34.4
1安装宝石
➜ Desktop $ sudo gem install cocoapods Successfully installed cocoapods-0.34.4 Parsing documentation for cocoapods-0.34.4 1 gem installed
➜桌面$ pod设置
/ Library / Ruby /Site/2.0.0/rubygems/dependency.rb:315:in to_specs':找不到200个宝石中的'cocoapods'(> = 0)(Gem :: LoadError)
gem env
签入'GEM_PATH = / Users /(用户名)/。rvm / gems / ruby-1.9.3-p374:/Users/vamshiraghu/.rvm/gems/ruby-1.9.3-p374@global' ,执行获取更多信息
from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:324:in$c$ c> to_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:58:in gem'
'
来自/ usr / bin / pod :22:in
➜ Desktop $ pod setup
/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 envfor 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:in gem'
from /usr/bin/pod:22:in
'
那么有人知道这个错误要排序吗?
推荐答案
我遇到同样的问题。尝试不同的安装和卸载组合时,我遇到了不同的错误。喜欢
I have same problem. I got different kinds of error when try different combination of install and uninstall. like
[!] 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 `<module:UserInterface>'
from /Users/riverhuang/.rvm/gems/ruby-2.1.5@global/gems/cocoapods-0.36.2/lib/cocoapods/user_interface.rb:7:in `<module:Pod>'
.
.
.
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 `<main>'
Could not find proper version of cocoapods (0.29.0) in any of the sources
Run `bundle install` to install missing gems.
清除计算机中的所有宝石后,我终于修复了它。这是我清除所有宝石的步骤。
After clear all gem in my computer I finally fixed it. Here is my steps to clear all gems.
gem uninstall --all
sudo gem uninstall --all
卸载所有宝石后,我重新安装了cocoapods。
After uninstall all gems I reinstall the cocoapods.
sudo gem install cocoapods
然后重启终端并运行:
pod setup
我猜它有依赖宝石中的冲突(错误的版本或不正确的路径)。就像我运行捆绑安装一样,它总是安装cocoapods 0.29.0及其所有依赖项。有和没有sodu安装宝石及其依赖于版本0.36.2的不同地方,当我这样做。
I guess it has conflict in dependency gems (wrong version or not in right path). Like once I run "bundle install" it always install cocoapods 0.29.0 and all its dependency. With and without "sodu" install gems and its dependency to different places with version 0.36.2 when I did it.
这篇关于Cocoapods安装设置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!