undefined method `rewrite' for #<String

I just repro'ed it by assigning a string to the @url instance variable. Make sure your controller/helper/view code is NOT assigning to @url anywhere (either directly or indirectly).

link_to/url_for and related uses the ActionController::Base @url instance variable to generate URLs, so if you (or plugins you've installed) clobber it somehow, you'll get this error.

Al Evans wrote: