Configure the Ruby environment before installing cocoapods, this article summarizes how to install the ruby environment. Installing the ruby environment requires first installing Xcode and then installing homebrew, and then installing RVM to install the ruby environment. Installing Xcode is needless to say, everyone will.
Homebrew is a package manager for installing UNIX tools that are not available on OS X on your Mac. Homebrew installs all of these tools into the/usr/local/cellar directory and creates symbolic links in/usr/local/bin.
1. Chinese Address: http://brew.sh/index_zh-cn.html
Open Terminal (Terminal) paste the following in the terminal
1 |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
During installation, you will need to press ENTER when you are finished installing the Brew Doctor command to check if the installation is successful, if you are prompted to "Your the system is ready to brew." Continue You can use it. Refer to: http://blog.csdn.net/maojudong/article/details/7918291
2. Installation Settings RVM
Command: Curl-l Https://get.rvm.io | Bash-s Stable
During this time, you will be asked your administrator's password, and automatically install the dependent package via homebrew, waiting for a period to install the RVM successfully. Then, load into the RVM environment (new open termal will not do so, will automatically reload)
3. Set RVM
Enable RVM with the following command
SOURCE ~/.RVM/SCRIPTS/RVM
Check to see if the correct command is installed
Rvm-v
The correct words will appear similar to the following text
RVM 1.26.11 (Master) by Wayne E. Seguin <[email Protected]>, Michal Papis <[email protected]> [https://rvm.io/ ]
4. Install Ruby
RVM Install 2.0.0
Long wait for the download process, after the installation is completed, you need to execute the following command to specify which Ruby is the system default
RVM 2.0.0--default
So, if you want to install Cocoapods, please visit the following link:
Http://www.cnblogs.com/foxting/p/4520758.html
The following links are referenced throughout the installation process:
Http://www.2cto.com/kf/201411/348389.html
Mac builds Ruby