Mechanize for Ruby on Linux not working...

  • Thread starter Just Another Victim of the Ambient Morality
  • Start date
J

Just Another Victim of the Ambient Morality

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...
 
S

Stefano Crocco

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

Stefano
 
J

Just Another Victim of the Ambient Morality

Stefano Crocco said:
Alle Saturday 13 September 2008, Just Another Victim of the Ambient
Morality
ha scritto:

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!
 
C

Cameron McBride

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top