gem which gemname

e.g.

raggi@mbk:~$ gem which hpricot
(checking gem hpricot-0.6 for hpricot)
/opt/local/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/hpricot.rb

On 4 Jan 2008, at 14:49, Nasir Khan wrote:

> Hi,
>
> Is there an easy way of finding the location of my installed gem
> programmatically.
> I need this to create an environment variable.
>
> Thanks
> Nasir