解决 can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)

2018-06-29 15:41:26 浏览数 (2)

今天 pod install 报错了,记录一下解决方案

报错如下 :

代码语言:javascript复制
/Library/Ruby/Site/2.0.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
    from /Library/Ruby/Site/2.0.0/rubygems.rb:298:in `activate_bin_path'
    from /usr/local/bin/pod:22:in `<main>'

解决方案:

�两步搞定

代码语言:javascript复制
sudo gem uninstall cocoapods

按提示输入密码,然后回车

代码语言:javascript复制
gem install cocoapods

install cocoapods

现在就可以 pod install 了

0 人点赞