一 设置源
1.查看源 gem souces -l
默认源 https://rubygems.org/
淘宝源 https://ruby.taobao.org
2.设置源
sudo gem souces -a https://ruby.taobao.org
3.删除源
sudo gem soiurces -r https://rubygems.org/
----------------------
https://www.oschina.net/news/71749/taobao-gems-ruby-china
sudo gem sources -a https://ruby.taobao.org
Error fetching https://ruby.taobao.org:
hostname "ruby.taobao.org" does not match the server certificate (https://ruby.taobao.org/specs.4.8.gz)
taobao Gems 源已停止维护,现由 ruby-china 提供镜像服务''
sudo gem souces -a https://gems.ruby-china.org/
sudo gem sources -a https://gems.ruby-china.org/
Error fetching https://gems.ruby-china.org/:
bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)
最后使用:sudo gem sources -a https://gems.ruby-china.com/
终于成功
二 安装
pod install 安装
pod updage 升级
查看是否安装成功 直接输入 pod 命令
三 搜索第三方框架
pod search SDWebImage
Creating search index for spec repo 'master'.
echo "pod 'SDWebImage'" >Podfile
pod install
pod update