[Rubygems-developers] Gem methods?

Chad Woolley thewoolleyman at gmail.com
Thu Oct 9 12:06:59 EDT 2008

On Thu, Oct 9, 2008 at 8:29 AM, Trans <transfire at gmail.com> wrote:

> Is there a way to see if a gem is active (without activating it of
> course)?

Hmm.  Check if it is on the load path.  Not sure how to check through the

> In addition is there a way to access a gemspec from code?

Yes, you can use the API to run all rubygems commands and get Specification
objects.  Check out GemRunner, that is the external API to use.  I just
posted an example of this recently in the thread about the .gemrc stuff.

> Lastly, is there a way to get the path to where a gem is installed?

The 'which' command, which should also be available via the API.

-- Chad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rubygems-developers/attachments/20081009/f206336c/attachment.html>

More information about the Rubygems-developers mailing list