[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Require Statement Problem

Matt White

9/12/2007 4:54:00 PM

Hello,

I am trying some things from irb and having trouble loading the
mechanize library. When I do gem list, it is in the list as:

mechanize (0.6.10, 0.6.9)
Mechanize provides automated web-browsing

But if I go to the irb prompt and do require 'mechanize', I get:

irb(main):001:0> require 'mechanize'
LoadError: no such file to load -- mechanize
from (irb):1:in `require'
from (irb):1

What have I got wrong?

2 Answers

Russell Norris

9/12/2007 4:59:00 PM

0

require "rubygems"
require "mechanize"

:)

RSL

On 9/12/07, Matt White <whiteqt@gmail.com> wrote:
> Hello,
>
> I am trying some things from irb and having trouble loading the
> mechanize library. When I do gem list, it is in the list as:
>
> mechanize (0.6.10, 0.6.9)
> Mechanize provides automated web-browsing
>
> But if I go to the irb prompt and do require 'mechanize', I get:
>
> irb(main):001:0> require 'mechanize'
> LoadError: no such file to load -- mechanize
> from (irb):1:in `require'
> from (irb):1
>
> What have I got wrong?
>
>
>

ElCuco

9/12/2007 5:07:00 PM

0

On 2007-09-12 12:53:34 -0400, Matt White <whiteqt@gmail.com> said:

> Hello,
>
> I am trying some things from irb and having trouble loading the
> mechanize library. When I do gem list, it is in the list as:
>
> mechanize (0.6.10, 0.6.9)
> Mechanize provides automated web-browsing
>
> But if I go to the irb prompt and do require 'mechanize', I get:
>
> irb(main):001:0> require 'mechanize'
> LoadError: no such file to load -- mechanize
> from (irb):1:in `require'
> from (irb):1
>
> What have I got wrong?

Set RUBYOPT env variable to 'rubygems'.


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www....