tags:

views:

36

answers:

2

Say I have two versions of a gem installed (somegem versions 0.10.6 and 0.10.5) and I want to run the earlier version from the commandline. Do I have to uninstall the newer version? Is there a way I can use a flag to specify which version I want to use? Something like...

somegem /path/to/dir --version 0.10.5

I checked the rubygems documentation, and it only describes how to use a specific version when you require a gem from a file, but nothing about how to do it from the commandline.

+1  A: 
somegem _0.10.5_ /path/to/dir

No link to documentation, because apparently there isn't any.

Jörg W Mittag
Do you reckon it's because the Rubygems folk are lax with documentation, or that this functionality is somewhat unsupported, or a mixture of the two?
Andrew Grimm
+1  A: 

Jörg's suggestion works great. Tried it out because I've never seen that before. Amazing that it's not documented:

jblake@zampano:~$ rails _3.0.1_ --version
Rails 3.0.1
jblake@zampano:~$ rails _2.3.8_ --version
Rails 2.3.8
Justin Blake