# test.rb
require 'Mechanize'
agent = Mechanize.new;
agent.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36';
a = agent.get('http://www.ascii2d.net/imagesearch')
/Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/gems/2.0.0/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:940:in `response_read': Content-Length (886) does not match response body length (2070) (Mechanize::ResponseReadError) (Mechanize::ResponseReadError)
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/gems/2.0.0/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:260:in `block in fetch'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/2.0.0/net/http.rb:1418:in `block (2 levels) in transport_request'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/2.0.0/net/http/response.rb:157:in `reading_body'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/2.0.0/net/http.rb:1417:in `block in transport_request'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/2.0.0/net/http.rb:1409:in `catch'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/2.0.0/net/http.rb:1409:in `transport_request'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/2.0.0/net/http.rb:1382:in `request'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/gems/2.0.0/gems/net-http-persistent-2.9/lib/net/http/persistent.rb:986:in `request'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/gems/2.0.0/gems/mechanize-2.7.2/lib/mechanize/http/agent.rb:257:in `fetch'
from /Users/ichigotake/.rbenv/versions/2.0.0-rc2/lib/ruby/gems/2.0.0/gems/mechanize-2.7.2/lib/Mechanize.rb:432:in `get'
テストスクリプトでMechanizeでコケることを確認