tags:

views:

38

answers:

3

How do you figure out what the older versions are for a particular Ruby Gem?

I need to revert to an older version of the rack gem but I'm not sure which versions are available.

+3  A: 

Go to

http://rubyforge.org/projects/#{gem_name}/

Click on 'Files' in the navbar and look at what .gem files are available. Those files are the official source of Rubygems.

Daniel Lucraft
+4  A: 

You can use the gem command for this, like so:

gem query --remote -a -n ^rack$

The -n switch of query restricts the search by regular expression, so in this case you only get the gem whose name exactly matches the string "rack".

Stuart Ellis
A: 

And if you want to know the old versions you have installed, use gem list:

$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.2)
actionpack (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.2)
activerecord (2.3.2, 2.3.1, 2.3.0, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.2)
...
Christian Lescuyer