Since RVM will install everything in it’s own directory and repoint your environment to the new installation, you won’t need to worry about prior failed installations of Ruby or Rails. In other words, you don’t need to uninstall everything and attempt a clean install.
On OS X, the key to setting up a Rails project is to use Homebrew to install MySQL and RVM to manage Rails. You’ll be running multiple rubies in seperate terminals concurrently in no time.
1) Install Homebrew with this:
1
|
|
2) Install Xcode if you haven’t already. Here’s a good installation article.
3) Install Git with Homebrew:
1
|
|
4) Install RVM:
To get the latest development state:
1
|
|
If you’ve already installed it, upgrading it:
1 2 3 |
|
Don’t forget to do the Post Install Configuration to set up your local shell.
5) Install Ruby 1.9.2-p320 (the latest at this writing) and set it as the default:
1 2 |
|
6) Install Rails:
1
|
|
7) Install MySQL:
1
|
|
Note: After installation, you’ll need to initialize your database. If you skip this, your database won’t work. Type brew info mysql
to see the instructions again.
8) Create new Rails app:
I like to create a directory first, generate the Rails app, and then initialize Git inside that directory.
1 2 3 |
|
Done! Now you can check your Ruby and Rails versions specific to that directory and start the Rails server.
1 2 3 |
|