It's a problem on the server. That's easy to tell because it's a 500-series error.
Here's HTTP request diagnostics 101:
Consider what would be different between a browser and Mechanize that a server could sense. You've got the request URL itself, and the headers that are sent as part of the HTTP request.
The URL itself is easy to visually check so that can be ruled out immediately if you've confirmed it's identical in both Mechanize and the browser.
That leaves the headers. Use a tool to check what headers your browser sends, then look to see what you're using with Mechanize. Make them match.
From experience, I suspect it's a case of the browser's signature, or the acceptable data-types, being different between the browser and Mechanize, and that site not knowing how to handle one or the other.