/Library/Ruby/Site/2.3.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'cocoapods' (>= 0.a) among 25 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/wsl/.gem/ruby/2.3.0:/Library/Ruby/Gems/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0', execute `gem env` for more information
from /Library/Ruby/Site/2.3.0/rubygems/dependency.rb:323:in `to_spec'
from /Library/Ruby/Site/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/bin/pod:22:in `<main>'
from /usr/local/bin/ruby_executable_hooks:24:in `eval'
from /usr/local/bin/ruby_executable_hooks:24:in `<main>'
image.png
- 查看RVM的版本,截止到目前 最新的版本是 1.29.9
2.如果之前安装过 RVM 想要更新 则 $ rvm get stable
列出 Ruby 可安装的版本信息 (这里安装的是 2.6.0 的,目前最新的是2.7.0)
$ rvm list known
安装一个 Ruby 版本
rvm use 2.6.0 --default
然后把2.6.0 设置成默认
image.png就解决这个问题了
网友评论