安装 cocoapods
安装 cocoapods
sudo gem sources --remove https://rubygems.org/
sudo gem sources -a https://gems.ruby-china.com/
gem sources -l
sudo gem install -n /usr/local/bin cocoapods
执行 sudo gem install -n /usr/local/bin cocoapods 时遇到的错误:
ERROR: Error installing cocoapods:
The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.6. Try installing it with `gem install drb -v 2.0.6` and then running the current command again
drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
zhpj@localhost ~ % ruby --version
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]
zhpj@localhost ~ %
zhpj@localhost ~ % brew install ruby@2.7
参考文章:

浙公网安备 33010602011771号