Question

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.

Was it helpful?

Solution

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".

OTHER TIPS

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.

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)
...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top