jjlee / mechanize

Stateful programmatic web browsing in Python, after Andy Lester's Perl module WWW::Mechanize .
http://wwwsearch.sourceforge.net/mechanize/
618 stars 123 forks source link

When starting Rails console, got error: "Mechanize is not a module (TypeError)" #73

Closed georgeu2000 closed 12 years ago

georgeu2000 commented 12 years ago

Don't know if I am doing something wrong, but here's what I did:

Created new rails app (Rails 3.0.7) gem install mechanize Added to Gemfile: gem 'mechanize'

Here is the complete error: > rails c /Users/george/rails/mechanize/config/application.rb:9:in '<top (required)>': Mechanize is not a module (TypeError) from /Users/george/.rbenv/versions/1.9.2-p290/gemsets/mechanize/gems/railties-3.0.7/lib/rails/commands.rb:21:in 'require' from /Users/george/.rbenv/versions/1.9.2-p290/gemsets/mechanize/gems/railties-3.0.7/lib/rails/commands.rb:21:in '<top (required)>' from script/rails:6:in 'require' from script/rails:6:in '<main>'

georgeu2000 commented 12 years ago

The problem was that the name of the app was Mechanize!