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.

can't run actionpack tests directly due to errant require

#983

git clone git://github.com/rails/rails.git
cd rails
cd actionpack
rake test_action_pack

... results in ...


no such file to load -- active_support/memoizable (MissingSourceFile)

Fix can be found in http://github.com/dchelimsky/rai...

Reported by David Chelimsky · September 6th, 2008 @ 01:06 PM

State: committed
Milestone: 2.x
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. DHH
    DHH
    • State changed from new to invalid
    • Tag changed from actionpack, tests to actionpack, patch, tests

    I can't replicate that on master? Seems to work here.

    September 10th, 2008 @ 05:20 AM

  2. David Chelimsky
    David Chelimsky

    Bummer. I just followed my instructions above (starting with a clean clone) and got the same result.

    Any chance you've got active_support's lib directory on your path? That could explain why you don't get this error.

    September 10th, 2008 @ 05:27 AM

  3. DHH
    DHH

    I do have the gems installed. Maybe that's it? Do you not have any Rails gems installed?

    September 10th, 2008 @ 05:32 AM

  4. David Chelimsky
    David Chelimsky

    I do:

    actionmailer (2.1.1, 2.1.0, 1.3.6) actionpack (2.1.1, 2.1.0, 1.13.6) actionwebservice (1.2.6) activerecord (2.1.1, 2.1.0, 1.15.6) activeresource (2.1.1, 2.1.0) activesupport (2.1.1, 2.1.0, 1.4.4) rails (2.1.1, 2.1.0, 1.2.6)

    So that's probably not it by itself. I was thinking more like you just had it added to your PATH in your .profile or .bash_login or whatever you might be using.

    Could also be a fluke of load order - I see, for example, in lib/action_controller.rb:

    
    begin
      require 'active_support'
    rescue LoadError
      activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
      if File.directory?(activesupport_path)
        $:.unshift activesupport_path
        require 'active_support'
      end
    end
    

    So if that file gets loaded before lib/action_controller/request.rb (which is the source of the load error I'm getting when it tries to require 'active_support/memoizable'), you wouldn't see the error I'm seeing

    Can you delete line 2 of test/abstract_unit and still run the tests? That would support this load order theory.

    September 10th, 2008 @ 05:50 AM

  5. Rob Sanheim
    Rob Sanheim

    We are also seeing the above issue on our local builds of Rails.

    Can David's fix above be applied? It looks like it maintains the exact behavior and fixes the load order issue.

    September 12th, 2008 @ 08:04 PM

  6. Michael Koziarski
  7. Michael Koziarski
    Michael Koziarski
    • Assigned user changed from josh to Jeremy Kemper

    September 15th, 2008 @ 04:49 PM

  8. madlep
    madlep

    I've been seeing this one as well.

    Patch attached that incorporates David Chelimsky's fix, and a similar fix for http://rails.lighthouseapp.com/p... , which has the same root cause.

    October 4th, 2008 @ 09:18 AM

  9. Michael Koziarski
    Michael Koziarski
    • State changed from invalid to open

    October 4th, 2008 @ 12:31 PM

  10. Repository
    Repository
    • State changed from open to committed

    (from [2def5b6314e1fbbaa789d1311e488ffac498703d]) Fixed load path for actionmailer and activesupport tests to always load from local lib files.

    [#983 state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...

    October 4th, 2008 @ 03:58 PM