美文网首页
一、Cocoapods安装与更新

一、Cocoapods安装与更新

作者: ugpass | 来源:发表于2020-07-21 16:33 被阅读0次

1.首先查看 gem source

gem sources -l

2.删除源

gem sources --remove https://rubygems.org/

3.添加新的源

gem sources --add https://gems.ruby-china.com/

4.升级ruby

查看ruby版本:ruby -v

安装homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

可以使用rvmbrew来安装最新的ruby

  • rvm:

    rvm install 2.5.3

    rvm use 2.5.3 --default

  • bew:

    brew install ruby

5.安装cocoapods

sudo gem install -n /usr/local/bin cocoapods

pod setup由于网络原因,会执行的很慢

可以使用如下命令

git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git ~/.cocoapods/repos/trunk

相关文章

网友评论

      本文标题:一、Cocoapods安装与更新

      本文链接:https://www.haomeiwen.com/subject/aabbkktx.html