How do I debug a Net::HTTPInternalServerError error when using Mechanize?

Posted by Janak on Stack Overflow See other posts from Stack Overflow or by Janak
Published on 2010-04-02T10:12:26Z Indexed on 2010/04/02 13:13 UTC
Read the original article Hit count: 449

Filed under:
|
|
|
c:/ruby/lib/ruby/gems/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:259:in `get': 500 => Net::HTTPInternalServerError (Mechanize::ResponseCodeError)

I get the above error when I try to navigate to the following webpage

http://fakewebsite.com//admin/edit_building.cfm?page=buildings&updateMode=yes&id=1251

I can navigate just fine when copy and paste the link into a browser.

Note: This website does require a login, which I handle with code like the following

$agent = Mechanize.new
$agent.get('http://fakewebsite//admin/login.cfm?res=-5')
form = $agent.page.forms.first
form.EMail = "admin"
form.Password = "password"
form.submit

This login works just fine, since I access other webpages protected by the login.

I'm not sure where to go from here, any suggestions?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby