- 安装homebrew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
- 选择2清华大学
- 输入电脑密码
- 输入y备份
- 中间需要根据提示回车确认 等待安装完成,可能还需要输入电脑密码,看提示执行就行
- 选择5阿里巴巴。
- 重启终端。
桌面可能会有一个old homebrew文件夹,可以删除
- 查看安装的homebrew
brew -v
- 检测rudy的源
gem sources -l
- 移除rudy自带的源
gem sources --remove https://rubygems.org/
- 替换成国内的源
gem sources --add https://gems.ruby-china.com/
6.查看是否成功
gem sources -l
7.安装cocopods
brew install cocoapods
8.更新cocopods
pod setup