Edge rails config.cache_classes = true breaks applications

when using current edge rails, i am getting trouble when using the
production environment – i tracked down the problem to the following
line

config.cache_classes = true

if i disable the class caching, everything works just fine, when
enabling the cache_classes, lots of errors get dropped – see the output
below:

error #1:

/Users/zecko/GIT/myapp/vendor/rails/activerecord/lib/active_record/base.rb:1742:in
method_missing_without_paginate': undefined methodfile_field’ for
#Class:0x36b049c (NoMethodError)
from
/Users/zecko/GIT/myapp/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:164:in
method_missing' from /Users/zecko/GIT/myapp/app/models/carsa_club.rb:117 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in require' from /Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:148:inrequire’
from
/Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:507:in
new_constants_in' from /Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:148:inrequire’
from
/Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:254:in
require_or_load' ... 21 levels... from /Library/Ruby/Gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:136:inrun!’
from /Library/Ruby/Gems/1.8/gems/thin-0.8.1/bin/thin:6
from /usr/bin/thin:19:in `load’
from /usr/bin/thin:19

when i comment out the parts with “file_field” i keep getting the
following errors:

/Users/zecko/GIT/myapp/vendor/rails/activerecord/lib/active_record/base.rb:1742:in
method_missing_without_paginate': undefined methoddemo_mode?’ for
#Class:0x373bfec (NoMethodError)
from
/Users/zecko/GIT/myapp/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:164:in
method_missing' from /Users/zecko/GIT/myapp/app/models/event.rb:39 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in require' from /Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:148:inrequire’
from
/Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:507:in
new_constants_in' from /Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:148:inrequire’
from
/Users/zecko/GIT/myapp/vendor/rails/activesupport/lib/active_support/dependencies.rb:254:in
require_or_load' ... 21 levels... from /Library/Ruby/Gems/1.8/gems/thin-0.8.1/lib/thin/runner.rb:136:inrun!’
from /Library/Ruby/Gems/1.8/gems/thin-0.8.1/bin/thin:6
from /usr/bin/thin:19:in `load’
from /usr/bin/thin:19

demo_mode? is a method that checks if the rails env is either
development or staging.
everything just works fine with rails 1.2, 2.0 and 2.1 …

any ideas?

thanks a lot!

-zecko

Any progress?

These seem to be related:

http://dev.rubyonrails.org/ticket/10896
http://dev.rubyonrails.org/ticket/10722

http://zilkey.com/2008/7/5/rails-cache-memcached-development-mode-and-offline-cache-invalidation

But I still haven’t seen a definitive solution.