From: "Abhishek K." Date: 2012-10-11T14:10:02+09:00 Subject: Re: How get list of all installed modules/gems in ruby Thanks. I want this in ruby code. above is not working for ruby1.8.7 but working for 1.9.2, is there any way whichworks for all versions of ruby? ruby-1.8.7 -e 'puts Gem::Specification.all().map{|g| [g.name, g.version.to_s] }' -e:1: uninitialized constant Gem (NameError) ruby-1.9.2 -e 'puts Gem::Specification.all().map{|g| [g.name, g.version.to_s] }' NOTE: Specification.all called from -e:1:in `
' minitest 1.6.0 rake 0.8.7 rdoc 2.5.8 ruby-graphviz 1.0.8 ruby-oci8 2.1.2 rubygems-update 1.8.24 sequel 3.37.0 -- Posted via http://www.ruby-forum.com/.