The original issue was that Mechanize was not timing out, so perhaps 
this would be a more universal fix:

require 'timeout'
Timeout::timeout(seconds) do
  Mechanize.something
end

-- 
Posted via http://www.ruby-forum.com/.