Installing Ruby development environment on Mac OS X Mavericks. Ruby on rails with the Ruby version manager, MySQL server and Brew.
Installing the prerequisites:
The Xcode command-line tools is required. This can be installed after you’ve installed the full Xcode installation or as a standalone by running the following command:
Installing the Xcode command-line tools:
Homebrew is my preferred package manager for Mac. It is similar to MacPorts.
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
…after the installation run the following command:
Installing MySQL server:
MySQL server can be installed via Homebrew or just by downloading and installing the official DMG file.
export PATH=$PATH:/usr/local/mysql/bin for a DMG installation
export PATH=$PATH:$(brew --prefix mysql)/bin if you installed via Homebrew.
Installing gcc 4.9
brew tap homebrew/versions
brew install gcc49
brew install autoconf automake libtool libyaml readline libksba openssl
Add the following three lines. Leave them commented out. You can uncomment them when you need gcc as compiler.
Installing RVM, the Ruby version manager:
\curl -L https://get.rvm.io | bash -s stable
Testing if installation was successfull:
After the installation is complete, restart the terminal App and type the following command:
You should get the following response:
rvm install ruby-2.0.0-p247
Setting and verifying the used Ruby version:
Installing and verifying rails:
Other Ruby gems can now also be installed by just running:
Here is the command reference for the