# Useful methods for RubyGems

**URL:** <https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064>\
**Category:** Ruby\
**Created:** [March 15, 2006, 4:54am UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064 "2006-03-15T04:54:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 4:54am UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/1 "2006-03-15T04:54:34Z")

</div>

Please, could these be added to the next version of Gems?

module Gem

```
 # Is gem active?
 def active?(gemname)
   @loaded_specs ||= Hash.new
   @loaded_specs.key? gemname
 end

 # Return gemspec of active gem
 def gemspec(gemname)
   @loaded_specs[gemname] if active?(gemname)
 end

 # Return path of active gem
 def gempath(gemname)
   @loaded_specs[gemname].full_gem_path if active?(gemname)
 end

```

end

I use this to get data files like so:

DATADIR = File.join(Gem.gempath(‘calibre’), ‘data’, ‘calibre’,  
‘units’)

Thanks,  
T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 4:01pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/2 "2006-03-15T16:01:11Z")

</div>

Should I send this to someone in particular instead?

T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 4:50pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/3 "2006-03-15T16:50:59Z")

</div>

Wouldn’t this be better off sent to the rubygems-developers mailing  
list?

Hope that helps,  
Jeff

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/4 "2006-03-15T18:56:27Z")

</div>

True. True. I just don’t want to subscribe to the list. But maybe a  
message will get thru w/o me subscribing. I’ll try that.

Thanks,  
T.

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/5 "2006-03-15T19:08:56Z")

</div>

On 3/14/06, Trans [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Please, could these be added to the next version of Gems?

Why not submit a feature request on RubyForge?

-austin

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/6 "2006-03-15T23:21:12Z")

</div>

On 15 Mar 2006, at 21:38, Trans wrote:

> (hmm… maybe Gems could use a boost of spirit. Here’s a thought.  
> Might  
> Gems ultimately morph into a general purpose package manager, suitable  
> to any project no matter the language involved? Maybe one of those  
> other killer apps Ruby needs.)

Well, FreeBSD has /usr/ports and that gets really useful if you run  
portupgrade from time to time. Wonder what that is written in… oh  
yeah, Ruby! 🙂

---

<div class="post-metadata">

**Author:** ![Trans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@Trans](https://www.ruby-forum.com/u/Trans)\
**Post date:** [March 15, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064/7 "2006-03-15T22:41:12Z")

</div>

Thanks Austin.

Unfortunately, from the looks of it, there’s absolutely no follow-up to  
those postings. Of course, so far, there seems to absolutely no follow  
up. Well, I’ll try to be patient and hopefully hear back eventually.

Thanks,  
T.

(hmm… maybe Gems could use a boost of spirit. Here’s a thought. Might  
Gems ultimately morph into a general purpose package manager, suitable  
to any project no matter the language involved? Maybe one of those  
other killer apps Ruby needs.)
