Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

action_dispatch/http/request.rb missing a require

#6393
% irb
> require 'action_dispatch'
 => true 
> ActionPack::VERSION::STRING
 => "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

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

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. tonycoco
    tonycoco

    +1 I've seen this too with the 3.0.4 release too. A quick fix is to add the mentioned "require 'active_support/core_ext/module/deprecation'" before you require action_****.

    February 11th, 2011 @ 10:52 PM

  2. Andrew White
    Andrew White
    • State changed from new to resolved
    • Importance changed from to Low

    March 5th, 2011 @ 07:31 PM