Yen
Yen

Reputation: 2186

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

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.

Upvotes: 1

Views: 164

Answers (3)

Christian Lescuyer
Christian Lescuyer

Reputation: 19253

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

Upvotes: 0

Stuart Ellis
Stuart Ellis

Reputation: 1609

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

Upvotes: 5

Daniel Lucraft
Daniel Lucraft

Reputation: 7356

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.

Upvotes: 3

Related Questions