1. Install Cocoapods,ruby version of the low-"start updating ruby-" began to update the gem, this is a no return AH comrades, all kinds of permission denied, various paths do not exist, various paths do not have read and write permissions, various unsuccessful!
2. Comfortable and elegant way: (ref:1190000003784636)
What is RVM? Why install RVM, because RVM lets you have multiple versions of Ruby and can switch freely between multiple versions.
First step: Install RVM
$ curl -L get.rvm.io | bash -s stable$ source ~/.rvm/scripts/rvm
rvm -v
If the version can be displayed, the installation is successful.
Step Two: Install Ruby (cocoapods requires 2.2.0 or more)
rvm list known
rvm install 2.1.4
If you want to set as the default version, you can use this command to complete
rvm use 2.1.4 --default
rvm list
rvm remove 2.1.4
MAC OS 10.11 Update ruby