[Rubygems-developers] Gem methods?

Trans transfire at gmail.com
Fri Oct 10 21:27:38 EDT 2008

On Oct 9, 7:18 pm, Eric Hodel <drbr... at segment7.net> wrote:
> On Oct 9, 2008, at 08:29 AM, Trans wrote:
> > Is there a way to see if a gem is active (without activating it of
> > course)?
> Gem.loaded_specs is a Hash mapping gem names to gemspecs

Ok. That's what I expected with this one, but I wanted to make sure.
Maybe something like Gem.loaded?(name, version) would be good feature
for the future.

> > In addition is there a way to access a gemspec from code?
> Gem.source_index has all available gems if you don't want active gems.

Nice. That's helpful.

> > Lastly, is there a way to get the path to where a gem is installed?
> The gemspec has it, check ri.

Cool, thanks Eric.

More information about the Rubygems-developers mailing list