This project is archived and is in readonly mode.
config.cache_classes = true causes MissingSourceFile error
Reported by Fredrik Björk | February 10th, 2009 @ 01:04 PM | in 2.x
When I run my Rails 2.2.2 app in production mode and config.cache_classes = true, I get the following error message:
c:/Ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.3/lib/polyglot.rb:40:in
load': Failed to load c:/Projects/au/app/models/member_mailer
using extensions rb, treetop, tt (MissingSourceFile) from
c:/Ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.3/lib/polyglot.rb:56:in
require'
from
C:/Projects/avatarsunited.com_new/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in
require' from
C:/Projects/avatarsunited.com_new/vendor/rails/activesupport/lib/active_support/dependencies.rb:262:in
require_or_load'
from
C:/Projects/avatarsunited.com_new/vendor/rails/activesupport/lib/active_support/dependencies.rb:221:in
depend_on' from
C:/Projects/avatarsunited.com_new/vendor/rails/activesupport/lib/active_support/dependencies.rb:133:in
require_dependency'
from
C:/Projects/avatarsunited.com_new/config/../vendor/rails/railties/lib/initializer.rb:368:in
load_application_classes' from
C:/Projects/avatarsunited.com_new/config/../vendor/rails/railties/lib/initializer.rb:367:in
each'
from
C:/Projects/avatarsunited.com_new/config/../vendor/rails/railties/lib/initializer.rb:367:in
load_application_classes' ... 10 levels... from
c:/Ruby/lib/ruby/1.8/irb/init.rb:250:in
load_modules' from
c:/Ruby/lib/ruby/1.8/irb/init.rb:21:in setup' from
c:/Ruby/lib/ruby/1.8/irb.rb:54:in
start' from
c:/Ruby/bin/irb:13
The error only occurs for my mailer (ActionMailer::Base) classes whenever cache_classes is set to true.
Any ideas what is wrong?
Comments and changes to this ticket
-
Scott Taylor February 11th, 2009 @ 08:04 AM
Probably some weird conflicting setup between rails and polyglot. Both swap out Kernel#require (rails does it for loading per request, and polyglot does it for .treetop files).
I found polyglot quite buggy in the past, so I'd look for issues there.
-
Tyler Montgomery February 23rd, 2009 @ 07:17 PM
As a work around just require actionmailer and your ActionMailer class in environment.rb
This will load your ActionMailer class before polyglot tries to require it.
-
DHH February 27th, 2009 @ 01:53 PM
- State changed from new to invalid
Seems to be related to polygot. Please do raise it over there.
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>