xcode-select --install
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
brew doctor
brew update
brew install rbenv ruby-build openssl
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
Run rbenv install --list
and choose the version of ruby that you want.
rbenv install --list
Available versions:
2.0.0-dev
2.0.0-p0
2.0.0-p195
2.0.0-p247
rbenv install 2.0.0-p247
rbenv rehash
rbenv global 2.0.0-p247
gem install bundler
rbenv rehash
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
brew install sqlite3 imagemagick
The next steps are necessary to create a mysql database.
http://dev.mysql.com/downloads/mysql/
brew install mysql
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist