On Sat, Sep 13, 2008 at 12:13 PM, Just Another Victim of the Ambient
Morality <ihatespam / hotmail.com> wrote:
>
> "Stefano Crocco" <stefano.crocco / alice.it> wrote in message
> news:200809131035.06226.stefano.crocco / alice.it...
>> Alle Saturday 13 September 2008, Just Another Victim of the Ambient
>> Morality
>> ha scritto:
>>>     The administrator for a server I'm using tried installing Mechanize
>>> for
>>> Ruby using the gem installer.  Gem claims that the installation worked
>>> except that programs trying to use it disagree.  Programs trying to use
>>> Mechanize get this error:
>>>
>>> in 'require': no such file to load -- mechanize (LoadError)
>>>
>>>     Does anyone know what's going wrong?  Maybe something hasn't been
>>> given
>>> the right permissions?  Maybe gems aren't the way to install modules for
>>> public use?
>>>     Any help is greatly appreciated, thank you...
>>
>> Before requiring files installed using rubygems, you need to either
>> require
>> 'rubygems' or add -rrubygems to the RUBYOPT environment variable. Not
>> doing
>> one of these things will give the error you reported.
>>
>> I hope this helps
>
>    I think it has!  I haven't written a program that uses these modules in
> earnest yet but my simple test program would suggest that it's working.  I'm
> guessing the Windows installer must set this environment variable
> automatically and that's why I've never heard of this, before...
>    Just to solidify my understanding, if this module had not been installed
> using rubygems, would a simple require have worked?
>    Thanks again!

yes.

Cameron