Forum: Ruby irb -r gemname produces error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A393d0639e9c313bcee804a12303b9e5?d=identicon&s=25 Gaudi Mi (gaudimila)
on 2009-05-22 13:31
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!
Eacf5ed623e72db0b87707baabd6f21a?d=identicon&s=25 Adam Gardner (adamgardner)
on 2009-05-22 17:00
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.
This topic is locked and can not be replied to.