Installing the ruby Environment
installing Ruby through homebrew
1. First, you need to install the homebrew on the system
At the command line, execute the following command to complete the Homebrew installation (you will be prompted for the current user's password during installation):
Ruby-e "$ (curl-fssl https://raw.github.com/Homebrew/homebrew/go/install)"
The command will fetch the latest version from Homebrew 's GitHub repository and automatically complete the installation. Once the installation is successful, you can use the Brew command to install the latest version of Ruby , as well as other tools.
The default installation directory for homebrew is /usr/local, and all brew -installed programs will be installed by default to /usr/local/cellars/ program name / Version number / directory
2. install The latest version of Ruby with Brew
You can automate the installation of the latest version of Ruby by executing the following command in turn at the command line:
Brew Update
Brew Install Ruby
Description
Brew Update will update the version information of all software supported by Brew from GitHub to ensure that you are able to install to the latest version
Brew install Ruby will crawl the latest version of the code from the Ruby GitHub repository and compile the installation
After successful installation, re-execute Ruby--version confirm that the latest version of Rubyhas been successfully installed:
$ Ruby--version
Ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
3. Install Rails
As with other platforms, the installation of Rails is done through the Gem command:
$ gem Install Rails
so far, you have been in your complete the latest Ruby and Rails installation and setup on your Mac OS X system. Enjoy It
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Installing the ruby Environment