RVM (Ruby Version Manager)

Posted by jason on Feb 20, 2010 in Uncategorized |

Motivation

The Rails 2.x has felt… hacky to me.  When I’ve looked at some of the code that has been generated, I’ve been turned off by the inline javascript I’ve seen.  I want the code that my framework creates to be extremely clean and standards oriented.  Inline javascript just doesn’t cut it for me.  Another thing that has bugged me is the disregard for other points of view.  In “Agile Web Development with Rails” book I read, the authors decided to denigrate the importance of having a very clean ORM layer because Rails didn’t have it.  It has felt that the Rails core team didn’t really care about correctness, they seemed hacky.  The merb team seemed to care about correctness in implementation which is why they were creating a lightweight, flexible foundation.  Because of this, Rails 3.0 excites me.

I’ve decided to do all my Rails development using 3.0.  I have no plans on releasing my software any time soon, and I really want to use the new bundler and the new routing features.  In order to do this, I want to be able to run multiple versions of Ruby on my machine.  My good friend Andrew Kavanaugh pointed me to RVM (Ruby Version Manager).

RVM Installation

I had no trouble following the directions to install RVM.  It installed without errors.  I encountered an error when I went to install a different Ruby version.  Inside the configure.error.log file, I had this line: “configure: error: C compiler cannot create executables”  Inside the configure.log file, I had “checking whether the C compiler works… no.”   When I upgraded to Snow Leopard, I didn’t upgrade my dev tools.  Once I installed Xcode 3.2.1, I had no problems installing my ruby versions.

RVM Usage

Install a new version of Ruby:

rvm install 1.9.2

List installed versions of Ruby:

rvm list

Change version of Ruby

rvm 1.9.2
rvm system

Change default

rvm 1.9.1 --default
rvm system --default

Reply

Powered by WP Hashcash

Copyright © 2010 programming with passion All rights reserved. Theme by Laptop Geek.