I went to test my latest changes to my app, and suddenly I.m getting an
error:
ActionView::TemplateError (undefined method read. for <memcache: 1 servers>:MemCache) on line #2 of app/views/chapters/_parabody.rhtml: 1: <% @body = parabody.body %> 2: <% cache(:action => .show., :action_suffix => .paragraph_#{parabody.id}.) do %> 3: <%=our_markdown(@body) %> 4: <% end %> #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/caching.rb:300:in
read_fragment’.
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:30:in
benchmark'. #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/caching.rb:299:in
read_fragment’.
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/caching.rb:276:in
cache_erb_fragment'. #{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/helpers/cache_helper.rb:6:in
cache’.
#{RAILS_ROOT}/app/views/chapters/_parabody.rhtml:2:in
`_run_rhtml_chapters__parabody’.
{…}
I haven.t touched that partial. Nor have I observed this in the past
when testing. I went so far as to set up a duplicate lighttpd setup
using the config I’m running in production on a different port, just
in case, and I still get the error. If I connect via the console, I
can look at the objects. Both are of class MemCache, both have
get_server_for_key methods, but my production instance has a read
method (Cache.respond_to? ‘read’ returns true), but my dev version
does not. I’m testing my dev version in production mode, just to
ensure that that’s not the problem, but no difference. The only
changes to environment.rb are the following lines in my dev version:
ENV[.RAILS_ENV.] = ‘production’
ActionController::Base.perform_caching = true
I don’t know what to look at beyond what I already have. Help?
Shalon Wood
–