rails 2.3.14片段缓存,memcache-client 1.8.5

时间:2011-09-10 08:02:46

标签: ruby-on-rails

我在rails 2.3.14,memcache-client 1.8.5中使用视图片段缓存。不幸的是它给出了错误:

ArgumentError: undefined class/module ActiveSupport::Cache::Entry

with backtrace:

[GEM_ROOT]/gems/memcache-client-1.8.5/lib/memcache.rb:250:in `load'
[GEM_ROOT]/gems/memcache-client-1.8.5/lib/memcache.rb:250:in `get_without_newrelic_trace'
[GEM_ROOT]/gems/memcache-client-1.8.5/lib/memcache.rb:886:in `with_server'
[GEM_ROOT]/gems/memcache-client-1.8.5/lib/memcache.rb:246:in `get_without_newrelic_trace' (eval):7:in `get'
[GEM_ROOT]/gems/newrelic_rpm-3.1.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped' (eval):4:in `get'
[GEM_ROOT]/gems/activesupport-2.3.14/lib/active_support/cache/mem_cache_store.rb:63:in `read'
[GEM_ROOT]/gems/activesupport-2.3.14/lib/active_support/cache/strategy/local_cache.rb:39:in `read'
[GEM_ROOT]/gems/actionpack-2.3.14/lib/action_controller/caching/fragments.rb:70:in `read_fragment'
[GEM_ROOT]/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:30:in `benchmark'
[GEM_ROOT]/gems/actionpack-2.3.14/lib/action_controller/caching/fragments.rb:69:in `read_fragment'
[GEM_ROOT]/gems/actionpack-2.3.14/lib/action_controller/caching/fragments.rb:39:in `fragment_for'
[GEM_ROOT]/gems/actionpack-2.3.14/lib/action_view/helpers/cache_helper.rb:35:in `cache' app/views/layouts/_mini_calendar.erb:37:in `_run_erb_app47views47layouts47_mini_calendar46erb_locals_mini_calendar_object'
[GEM_ROOT]/gems/actionpack-2.3.14/lib/action_view/renderable.rb:34:in `send'
.......................

为什么要尝试加载rails 2.3中不存在的ActiveSupport :: Cache :: Entry?

谢谢!

1 个答案:

答案 0 :(得分:0)

答案很简单。在一台服务器上,我们有rails 2.3和rails 3 app,它们将一些东西缓存到一个同名的memcache服务器上。所以rails 2.3 app试图获取rails 3 app缓存的片段。