using rvm aliases -

Moin Moin,

let’s assume, you have many different Ruby’s for your projects and you want to keep your gems separate in each Ruby. The best way (in my experience) is to use different Ruby versions and use there the needed gems for this kind of application. An example:

You have different Rails 2.3.17 applications. When running against a Mock, you use ruby-1.8.7-p371, when running against a WebService, you use jruby-1.7.2.

Then you have different Rails 3.2.12 applications. When running against a Mock, you use ruby-1.9.3-p392, when running against a WebService, you use jruby-1.7.3.

So this is what we’ve got so far:

Well, to remember this, some unnecessary brain activity is needed. Let’s simplify that with creating some aliases:

Nice. Now we could write rvm use salesm. But when using rvm list, we don’t see the aliases listed. Simple enough, we creat an alias in ~/.bashrc or ~/.bash_profile:

Now we can see both results from rvm list and rvm alias list:

Simple and helpful … isn’t it?

Cheers

Published: March 01 2013