From: "Abhishek K." Date: 2012-10-04T19:32:11+09:00 Subject: Re: How to get installed module version Lars Haugseth wrote in post #1078607: > On 10/04/2012 12:03 PM, Abhishek K. wrote: >>> >>> nokogiri (1.5.5, 1.5.0) >> >> Thanks Jesus, is there any way i can get by ruby command like >> >> ruby1.8 -rMODULE -e 'puts ....' >> ruby1.9.1 -rMODULE -e 'puts ....' > > If you want to search for more information on this topic, note that the > correct term for "modules" in the Ruby world is "gems". > > You can get at information about installed gems from Ruby code through > the Gem::Specification class. > > http://rubygems.rubyforge.org/rubygems-update/Gem/Specification.html > > What are you going to do with that information, though? If your code > depends on certain versions of gems, you should take a look at Bundler. > > http://gembundler.com/ thanks for your responce I need to check what all gems(modules) installed and what is therir version on each version of ruby, we have two version installed ruby1.8 and ruby1.92 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__)"; -- Posted via http://www.ruby-forum.com/.