安装 rvm
$ curl -L get.rvm.io | bash -s stable $ source ~/.bashrc $ source ~/.bash_profile $ rvm list known $ rvm install 2.5.1 $ sudo gem install cocoapods -v 1.5.3