# Irb -r gemname produces error

**URL:** <https://rubytalk.org/t/irb-r-gemname-produces-error/53516>\
**Category:** ruby-talk\
**Created:** [22 May 2009 11:31 UTC](https://rubytalk.org/t/irb-r-gemname-produces-error/53516 "2009-05-22T11:31:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaudi\_Mi1](https://avatars.discourse-cdn.com/v4/letter/g/2bfe46/32.png) [@Gaudi\_Mi1](https://rubytalk.org/u/Gaudi_Mi1)\
**Post date:** [22 May 2009 11:31 UTC](https://rubytalk.org/t/irb-r-gemname-produces-error/53516/1 "2009-05-22T11:31:35Z")

</div>

Noobie question: every time I run for example:

irb -r hpricot

I get the error:

...'require': no such file to load -- hpricot (LoadError)...

and it happens regardless of which gem I wish to require. I do a gem  
list and it shows the gems I need are all installed. What am I  
overlooking?

Thanks!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Adam\_Gardner](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@Adam\_Gardner](https://rubytalk.org/u/Adam_Gardner)\
**Post date:** [22 May 2009 15:00 UTC](https://rubytalk.org/t/irb-r-gemname-produces-error/53516/2 "2009-05-22T15:00:26Z")

</div>

Gaudi Mi wrote:

> Noobie question: every time I run for example:
> 
> irb -r hpricot
> 
> I get the error:
> 
> ...'require': no such file to load -- hpricot (LoadError)...
> 
> and it happens regardless of which gem I wish to require. I do a gem  
> list and it shows the gems I need are all installed. What am I  
> overlooking?
> 
> Thanks!

Assuming that you're running Ruby 1.8.x, what you're missing is a  
-rubygems option.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
