安装 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 [email protected]
参考文章:
标签:安装,sudo,version,cocoapods,install,ruby,gem From: https://www.cnblogs.com/zhpj/p/18122515/install-cocoapods-rttoe