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.

Load ActionMailer templates only if it is included in configuration.frameworks

#697

I'm developing on edge, and my app doesnt currently require ActionMailer or ActiveResource, so I disabled them in RAILS_ROOT/config/environment.rb

config.frameworks -= [ :active_resource, :action_mailer ]

I'm on edge rails commit # 3fd9036fc554979e951422a79f0f77f061112bdc

I then typed rake spec and got the following stacktrace: http://pastie.org/240477.

(I know some if you might think this could be an rspec problem, but i'm not so sure. Hear me out a little bit more..)

I opened up vendor/rails/railties/lib/initializer.rb and looked at load_view_paths on line 342.

I changed line 344 from

ActionMailer::Base.template_root.load

to

ActionMailer::Base.template_root.load if configuration.frameworks.include?(:action_mailer)

and my problem went away.

This just seems like a common sense fix for those of us on edge, or on vendor rails.

Reported by Sam Granieri · July 24th, 2008 @ 07:27 PM

State: resolved
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. josh
    josh
    • State changed from new to open
    • Assigned user set to josh

    July 24th, 2008 @ 07:29 PM

  2. Jason Roelofs
    Jason Roelofs

    Running into the same issue. I've got a patch that includes a test as well.

    July 24th, 2008 @ 07:34 PM

  3. josh
  4. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • Tag cleared.

    Automatic cleanup of spam.

    November 8th, 2010 @ 08:22 AM