First, install the system needs the package
Install the Xcode development tool, which will help you install the development packages required for your UNIX environment
Open the App Store, search Xcode, the first is, yes, there are 4 more g, speed if not good, please first toilet cry, slowly wait ~
Second, installation RVM
What is RVM? Don't understand? It doesn't matter, you are reading this article, said you also do not understand, if you understand also don't need to see this, later you slowly and understand ~ begin to enter the topic:
(1) Open the terminal of the Mac and enter a sequence of commands: curl-l Https://get.rvm.io | bash-s stable
(2) loading into RVM environment
In terminal window input:source ~/.RVM/SCRIPTS/RVM
(3) Check whether the RVM is installed correctly
In the terminal window, type:rvm-v
If you see, then, congratulations ~ ~ ~
Third, install Ruby environment with RVM
(1) List of known Ruby versions
In the terminal window, enter:RVM list known
(2) Select the existing Ruby version to install (take 2.4.0 this version as an example)
In the terminal window, enter:RVM install 2.4.0
(3) Query the installed Ruby
In the terminal window, enter:RVM list
When when is perfect!
Iv. setting up the Ruby version
In the terminal window, enter:RVM 2.4.0--default
Oh, my!
Build a ruby environment on your Mac