From: Lars Haugseth Date: 2012-10-04T21:02:42+09:00 Subject: Re: How to get installed module version On 10/04/2012 12:32 PM, Abhishek K. wrote: > i am looking something we do in perl and python same way in ruby like > > perl -MABC -e 'print "$ABC::VERSION"' > > python -c "import MODULE; print (MODULE.__version__)"; List all gems and their version: $ ruby -e 'puts Gem::Specification.map {|gem| "#{gem.name}: #{gem.version}"}' List all installed versions of a particular gem: $ ruby -e 'puts Gem::Specification.find_all_by_name("rake").map(&:version)' -- Lars Haugseth