我已经像那里一样安装了cocoapods
alex-z:~ alex-z$ /usr/bin/gem list --local | grep "cocoapods"
结果为空
alex-z:~ alex-z$ sudo !!
结果是
cocoapods (0.33.1)
cocoapods-core (0.33.1)
cocoapods-downloader (0.6.1)
cocoapods-plugins (0.2.0)
cocoapods-trunk (0.1.4)
cocoapods-try (0.3.0)
接下来
alex-z:~ alex-z$ /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/gem list --local | grep "cocoapods"
alex-z:~ alex-z$ sudo !!
结果与之前命令的结果相同
当我尝试使用时pod
出现错误
alex-z:~ alex-z$ pod --version
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'cocoapods' (>= 0) among 87 total gem(s) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/pod:22:in `<main>'
有没有其他人解决过这个问题?