Skip to content

Instantly share code, notes, and snippets.

@whistler
Created February 2, 2013 22:39
Show Gist options
  • Save whistler/4699578 to your computer and use it in GitHub Desktop.
Save whistler/4699578 to your computer and use it in GitHub Desktop.
Install Rails on Mac
# Pre-requisite: X-Code Command Line Tools: http://connect.apple.com
# install homebrew
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# git
brew install git
#rbenv
brew install rbenv
brew install ruby-build
# Ruby
rbenv install 1.9.3-p194
rbenv global 1.9.3-p194
rbenv local 1.9.3-p194
# Imagemagick
brew install imagemagick
# MySQL
brew install mysql
# Start + startup init
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mysql/5.5.27/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
# Setup MYSQL
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
# Set root password
mysqladmin -u root password 'password'
# Rails
gem install bundle
gem install rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment