This project is archived and is in readonly mode.

#697 ✓resolved
Sam Granieri

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

Reported by Sam Granieri | July 24th, 2008 @ 07:27 PM | in 2.x

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.

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>

Pages