升级了ruby 后,pod所有命令均无法执行,升级gem 无效
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:270:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:298:in `activate_bin_path'
from /usr/local/bin/pod:22:in `<main>'
解决方式: 移除pod目录,重新安装pod
1. sudo rm -rf /usr/local/bin/pod
此时 gem list , pod 相关的已经全不在
2. sudo gem install cocoapods
此时 pod --version ,可以正常看版本号,问题解决