Before the article started, it is recommended to install a plug-in showing the speed, or you do not know whether there is no download, but also make life a little look forward
1. For well-known reasons (my dang's behavior is really disappointing), change the ruby image source first
$ gem Sources--remove https://rubygems.org/
$ gem sources-a https://ruby.taobao.org/
$ gem sources-l
These three steps are generally not wrong.
2. Start the installation of Cocoapods
$ sudo gem install-n/usr/local/bin cocoapods //os x 10.11 System after reference other information
Now we have the first error:error:error installing Cocoapods:activesupport requires Ruby version >= 2.2.2.
It means you have to upgrade Ruby to 2.2.2 or more, we use RVM to install, so also to install RVM
$ curl-l Get.rvm.io | bash-s stable //back should have two lines, if not successful search "RVM installation"
After successful prompt: * to start using RVM u need to run ' SOURCE/USERS/YUEBIN/.RVM/SCRIPTS/RVM', meaning to let you follow this path to find this program, Open and run, OK
$command RVM Install 2.3.0 //Start the installation ruby2.3.0, start reading the download progress, the file only about 12 trillion, but the download speed extremely easy to fail , I tried 5, 6 times to fix, need patience
The success will be a bunch of hints: if you see a line that is the Install of ruby-2.3.0-#complete ; The new Ruby version is ready.
$RVM use 2.3.0 //ruby can co-exist in multiple versions, and after downloading, you can $ruby-V with commands, and check the current Ruby version
3. Start the installation again Cocoapods
$ sudo gem install-n/usr/local/bin cocoapods //Go back to the beginning of the wrong place, re-execute, will start to download more than 100 trillion files, start and so on
$pod Setup //Successful green font display:Setup completed here Cocoapods has been installed, you can use the $pod search "FMDB" test
Cocoapods installation (This is really a magical thing, each installation method is not the same, and very prone to a variety of errors)