Loading

安装 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

参考文章:

Mac 从零安装cocoapods

posted @ 2024-04-08 20:33  zhpj  阅读(73)  评论(0)    收藏  举报