# Mechanize problem

**URL:** <https://www.ruby-forum.com/t/mechanize-problem/124858>\
**Category:** Ruby\
**Created:** [January 3, 2008, 7:21am UTC](https://www.ruby-forum.com/t/mechanize-problem/124858 "2008-01-03T07:21:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/u/Ramiro_Diaz_Trepat)\
**Post date:** [January 3, 2008, 7:21am UTC](https://www.ruby-forum.com/t/mechanize-problem/124858/1 "2008-01-03T07:21:59Z")

</div>

Hello,  
I can’t run even the most trivial examples of Mechanize, neither on  
Ubuntu nor in Leopard because I get the following error:

./mechanize.rb:4: uninitialized constant WWW (NameError)  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
from google.rb:2

I have installed mechanize with all its dependencies.  
Can anybody give me a hint about what’s wrong with my installation or  
whatever am I doing wrong?  
Thanks

r.

---

<div class="post-metadata">

**Author:** ![Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/u/Ramiro_Diaz_Trepat)\
**Post date:** [January 3, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/mechanize-problem/124858/2 "2008-01-03T12:53:23Z")

</div>

On Jan 2, 2008, at 22:20 , Ramiro Diaz Trepat wrote:

> I can’t run even the most trivial examples of Mechanize, neither on  
> Ubuntu nor in Leopard because I get the following error:
> 
> ./mechanize.rb:4: uninitialized constant WWW (NameError)

rename your script from mechanize.rb to something else. ‘.’ is in your  
path so the require ‘mechanize’ you (should) have does nothing.

Bites us all now and then.

---

<div class="post-metadata">

**Author:** ![Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@Ramiro\_Diaz\_Trepat](https://www.ruby-forum.com/u/Ramiro_Diaz_Trepat)\
**Post date:** [January 3, 2008, 6:05pm UTC](https://www.ruby-forum.com/t/mechanize-problem/124858/3 "2008-01-03T18:05:55Z")

</div>

Thank you very much Ryan !  
It was as silly as that… sorry.
