Clean Rails Install on OS X Mountain Lion: Homebrew + RVM + Ruby 1.9.3 + Git + MySQL
1. Command Line Tools
2. Homebrew
$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
$ brew install automake
3. RVM
$ \curl -L https://get.rvm.io | bash -s stable --ruby
$ source ~/.rvm/scripts/rvm
4. Ruby 1.9.3
$ rvm install 1.9.3-head
$ rvm use ruby-1.9.3-head
5. Rails
$ gem install rails
6. Git
brew install git
7. MySQL
$ brew install mysql
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
$ 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
Written by Jonathan Nelson
Related protips
10 Responses

Hey , hi , thnaks for this , is a must, but I'm stuck in step 3 , 'cos I always get permission denied : mkdir: /{MyUser}.rvm/src: Permission denied
Thanks


@locke try to use sudo

I got a problem with sqlite3 after update to mountain lion can you write about it please
this helped me get going... thanks!

RVM sucks.

@errordeveloper, care to elaborate?
Just want to add you don't need to manually call homebrew to install automake, RVM's autolib does it for you.

This was a great help. Thanks!
For any n00bs, on step 7, of course, update "cp /usr/local/Cellar/mysql/5.5.27/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/" to reflect the version of mysql you have (I had 5.6.12 instead of 5.5.27)

This page was of super-help to me. Thanks you folks ! -- Deb

good work.. bro!