Ruby on Rails Configuration on Mac OS X 10.11
This is a memo of how to setup Ruby-on-Rails on Mac OS X 10.11. Especially, to get it work on RubyMine 8.0.3.
The following process might not be the solution for everyone.
Command-Line Tools
First of all, make sure developer command-line tools is installed.
xcode-select --install
If it is already installed, expected output should be:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Homebrew
Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Mac OS X 10.11 comes with version 2.0.0 of Ruby so this command should work.
Then we can install almost all the packages we need via homebrew.
Ruby
Use the officially recommended way to manage ruby versions with rbenv.
brew install rbenv ruby-build
rbenv install 2.2.4
rbenv global 2.2.4
Check version:
ruby -v
Dependencies
If I remember correctly.
brew update
brew upgrade
brew install libxml2 libxslt libiconv
gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/
brew install mysql
gem install mysql