auvm9g
Last Updated: April 18, 2016
·
26.87K
· jonathannelson

Clean Rails Install on OS X Mountain Lion: Homebrew + RVM + Ruby 1.9.3 + Git + MySQL

1. Command Line Tools

Install Package

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

9 Responses
Add your response

5172
892fa2430f1dbed47bcfed37933e119d

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

over 1 year ago ·
5547
16162fed91387cc1cec055412db0022d

@locke try to use sudo

over 1 year ago ·
6290
9ae06db6e32f12a4656093d6e827d1f3

I got a problem with sqlite3 after update to mountain lion can you write about it please

over 1 year ago ·
6881
F13786f09cbf6e122d0ec0b9439de126

this helped me get going... thanks!

over 1 year ago ·
7354
121dcfb4f05ed316247772545e2cd590

RVM sucks.

over 1 year ago ·
7355
064d413d41a6347b63bacc0c56d4bb85

@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.

over 1 year ago ·
7914
Ce8435b03b83cce8287654d5d391af14

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)

over 1 year ago ·
13901
0 yq555bb0 uc jy7morcs5qfhtw 8xz7mo1lv5zqxyubk8pzjr vwiv8l7fixpxmvgcbuetqyqjem

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

over 1 year ago ·