This project is archived and is in readonly mode.

#5760 ✓duplicate
Geoff Buesing

Missing require in action_controller/url_rewriter

Reported by Geoff Buesing | October 5th, 2010 @ 10:11 PM | in 2.3.10

action_controller/url_rewriter depends upon the URI library from Ruby's standard library, but it doesn't require it. This patch simply adds the missing require 'uri'.

Ran into this issue when I upgraded some dependencies and redeployed -- Rails couldn't boot because I was configuring ActionMailer settings in config/environments/production.rb, which loads ActionMailer::Base, which includes ActionController::UrlWriter, which is missing the require 'uri', resulting in a missing constant error for ActionController::UrlWriter::URI.

Didn't get this error in development or test because I wasn't configuring ActionMailer in those environments. Nasty bug with an easy fix.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages