How to install Ruby Version Manager (RVM) in OSX for Ruby & Terminal Nubies, Part 2

 There are already a few great tutorials out there on installing RVM that assume the user has a certain amount of software development experience, or has certain software installed. If you don't, well, things can get confusing pretty quick.

This is part 2 of a step by step tutorial specially designed for Ruby & Terminal Nubies. If you can surf the web and use your mac for day to day stuff, this tutorial is designed guide you through everything else you need to know. No software development experience required.

If you haven't read part 1 of this tutorial: Setting up the Software Ecosystem, I recommend you do so before trying part 2. Otherwise, this stuff may not work for you. 

Once you've launched Terminal, installed Git, xCode 3.2+ and Textmate, as described in part 1, we're ready to roll. 

First type this in Terminal:
git --version
Terminal should reply with
"git version 1.7.2"
  like this:
Screen_shot_2010-08-07_at_10

This means Git was installed. 

Next, go to the RVM website, copy this script from the install page:
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
and paste it into your Terminal. 

A bunch of stuff will happen. Let it. 

Once it stops, take some time to read what came up. A lot of it actually looks like human-speak.

Type in the following:
cd ~

That should take you to your home directory. 

Type in:
ls

You should see a listing of the directories/folders in your home directory.  On my system it looks something like this:
Screen_shot_2010-08-09_at_4

Type:
touch .bash_profile

The touch command makes new a file in the current directory if that file does not exist. 

and then Type:
mate .bash_profile

This should open the .bash_profile file you made in Texmate. The file should be blank. 

IMPORTANT: if there is stuff in this profile, don't mess with it! Just close the file without saving it and contemplate how close to disaster you just came. 
If the .bash_profile file is blank like it should be, go ahead paste this in:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
So the file looks like this:
Screen_shot_2010-08-09_at_4
Save & close the file.

If you get some prompts asking your for your password. Just type it in and save. 
Now go to the Shell menu and select "New Window" or click command + N to  launch a new Terminal window.
It's important you do this next step in a NEW Terminal window, and not the window we've been using til now. 
type rvm | head -n1
and hit return. 
You should get a screen that says "rvm is a function"  like this:
Screen_shot_2010-08-07_at_11
Now it's time to start downloading versions of Ruby and learning about rvm best practices. The best place to do that is probably  Wayne E. Seguin's site, since he's the guy that wrote RVM.
I hope these tutorials were useful and that you have a great time learning about Ruby and RVM. If you have any suggestions for tutorials you'd like to see in the future, feel free to drop me a line or leave a comment.