Moe Zecko
2008-Sep-03 18:39 UTC
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 method `file_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:in `gem_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:in `require'' 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:in `require'' 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:in `run!'' 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 method `demo_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:in `gem_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:in `require'' 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:in `require'' 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:in `run!'' 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Any progress? These seem to be related: http://dev.rubyonrails.org/ticket/10896 http://dev.rubyonrails.org/ticket/10722 http://railscasts.com/episodes/115 http://zilkey.com/2008/7/5/rails-cache-memcached-development-mode-and-offline-cache-invalidation But I still haven''t seen a definitive solution. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---