From: Shawn Anderson Date: 2009-02-05T04:10:21+09:00 Subject: Re: Native gem roundup! --0015175cf83cb78cd304621c8bfb Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Gem::Specification.list.select {|s| s.extensions.size > 0 }.map {|s| s.name}.uniq.sort =3D> ["RedCloth", "eventmachine", "fastthread", "ferret", "hpricot", "mongrel", "mysql", "narray", "ncurses", "neuro", "rcov", "rfuzz", "rmagick", "ruby-debug-base", "ruby-fann", "ruby-opengl", "ruby-prof", "rubygame", "rubysdl", "sandbox", "sqlite3-ruby", "termios", "thin"] >> Gem::Specification.list.select {|s| s.extensions.size > 0 }.map {|s| s.name }.uniq.size =3D> 23 2009/2/4 Joel VanderWerf > Rados=B3aw Bu=B3at wrote: > >> 2009/2/4 Joel VanderWerf : >> >>> Not sure why this doesn't work for me: >>> >>> $ ruby -e 'p Gem::Specification.list.select {|s| s.extensions.size > 0 >>> }.map >>> {|s| s.name }.sort' >>> [] >>> >> >> Don't ask me why but it will work if you load at least one gem by >> rubygems. Try with: >> >> ruby -rubygems -e "require 'rake'" -e 'p >> Gem::Specification.list.select {|s| s.extensions.size > 0 }.map {|s| >> s.name }.sort' >> >> My previous try was from irb session so it was already loaded many gems. >> Weird. >> Rubygems sucks at many things, specially in loading *all* gems specs >> so it end up with eating more memory if you have insalled many gems >> (as I do). >> >> > Thanks, that works. > > > -- > vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407 > > --0015175cf83cb78cd304621c8bfb--