This project is archived and is in readonly mode.

#6393 ✓resolved
Daniel Azuma

action_dispatch/http/request.rb missing a require

Reported by Daniel Azuma | February 9th, 2011 @ 06:10 AM

% irb
> require 'action_dispatch'
 => true 
 => "3.0.4" 
> ActionDispatch::Request
NoMethodError: undefined method `deprecate' for ActionDispatch::Request:Class
        from .../actionpack-3.0.4/lib/action_dispatch/http/request.rb:146:in `<class:Request>'
        from .../actionpack-3.0.4/lib/action_dispatch/http/request.rb:11:in `<module:ActionDispatch>'
        from .../actionpack-3.0.4/lib/action_dispatch/http/request.rb:10:in `<top (required)>'
        from (irb):3

The problem seems to be a missing

require 'active_support/core_ext/module/deprecation'

in action_dispatch/http/request.rb

This only really shows up if you load parts of the framework in an unusual order (e.g. the example code above). Most people won't run into it because the relevant ActiveSupport stuff will usually be loaded by other parts of the framework before ActionDispatch::Request gets referenced. However, I ran into it because I have some framework-extending code that loads ActionDispatch::Request in isolation, so I'm reporting this.

This first appeared in 3.0.4

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=""></a>