This project is archived and is in readonly mode.
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
-
josh July 24th, 2008 @ 07:29 PM
- State changed from new to open
- Assigned user set to josh
-
Jason Roelofs July 24th, 2008 @ 07:34 PM
Running into the same issue. I've got a patch that includes a test as well.
-
josh July 24th, 2008 @ 07:53 PM
- State changed from open to resolved
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>