Monday, May 13, 2013

Installing RVM on OS X

I have been dabbling in Ruby development recently and found that it would be handy to use a tool similar to Python Virtualenv. I feel that this makes for a cleaner development environment. After years of tutorials and miscellaneous O'Reilly book examples my Site and Gems are a bit of a mess. So after looking around on Google rvm seemed like a great choice.

Install(From RVM homepage):

 curl -L https://get.rvm.io | bash -s stable --autolibs=3  

Source RVM

 . ~/.rvm/profile or ~/.rvm/bash_profile

Depending on where the installation process put the RVM path.

 NOTE - I had run the command with brew in /usr/local/bin and it kept complaining that it couldn't do the symlink.
Next run:

 rvm requirements  

Then install a version of Ruby. I used 1.9.3 and to do that, I entered the following command:

 rvm install 1.9.3  

Once that was completed, start using your new version by issuing this command:

 rvm use 1.9.3  
Then create a gemset that can be used for a specific project or type of project by typing:
 
 rvm gemset create demonstration  
 rvm gemset use demonstration  

Hopefully you find this useful. I have done the installation twice... and ended up with different install paths. I also found this blog post by Stewgleadlow to be helpful.