orslumen/record-cache — Issue #19: Rails 3.2 store fields
Author: alecslupu
Created: 2012-02-16 11:58:44+00:00
State: open

I have the following setup using mecached:

class Collection < ActiveRecord::Base
cache_records :key => 'collection'
# my methods
end

whenever i try to save or edit a record that i have tried to edit before, I get a stacktrace like this, only if i have the record-cache enabled...

ActionView::Template::Error (no member 'completed_fame' in struct):
1: = form.send field.view_helper, field.method_name, field.html_attributes.reverse_merge((hdv = field.html_default_value).nil? ? {} : { :value => hdv, :checked => hdv })
activerecord (3.2.0) lib/active_record/store.rb:44:in `[]'
activerecord (3.2.0) lib/active_record/store.rb:44:in `block (2 levels) in store_accessor'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/lib/rails_admin/abstract_object.rb:21:in `method_missing'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1154:in `value_before_type_cast'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1142:in `value_before_type_cast'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1036:in `block in to_input_field_tag'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1036:in `fetch'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1036:in `to_input_field_tag'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1049:in `to_number_field_tag'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:938:in `number_field'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:1277:in `number_field'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/views/rails_admin/main/_form_field.html.haml:1:in `__mnt_data_myapp_shared_bundle_ruby_______bundler_gems_rails_admin____________f_app_views_rails_admin_main__form_field_html_haml__1921039710147814407_47694540'
actionpack (3.2.0) lib/action_view/template.rb:143:in `block in render'
activesupport (3.2.0) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.0) lib/action_view/template.rb:141:in `render'
actionpack (3.2.0) lib/action_view/renderer/partial_renderer.rb:257:in `render_partial'
actionpack (3.2.0) lib/action_view/renderer/partial_renderer.rb:230:in `block in render'
actionpack (3.2.0) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (3.2.0) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.0) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.0) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (3.2.0) lib/action_view/renderer/partial_renderer.rb:229:in `render'
actionpack (3.2.0) lib/action_view/renderer/renderer.rb:41:in `render_partial'
actionpack (3.2.0) lib/action_view/renderer/renderer.rb:15:in `render'
actionpack (3.2.0) lib/action_view/helpers/rendering_helper.rb:24:in `render'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:11:in `block in render_with_haml'
haml (3.1.4) lib/haml/helpers.rb:90:in `non_haml'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:11:in `render_with_haml'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/lib/rails_admin/config/fields/base.rb:211:in `render'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/lib/rails_admin/config/proxy.rb:29:in `method_missing'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:68:in `field_for'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:50:in `block in input_for'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
haml (3.1.4) lib/haml/helpers/xss_mods.rb:109:in `with_output_buffer_with_haml_xss'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `capture'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:105:in `capture_with_haml'
actionpack (3.2.0) lib/action_view/helpers/tag_helper.rb:91:in `content_tag'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:123:in `content_tag_with_haml'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:49:in `input_for'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:42:in `block in field_wrapper_for'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
haml (3.1.4) lib/haml/helpers/xss_mods.rb:109:in `with_output_buffer_with_haml_xss'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `capture'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:105:in `capture_with_haml'
actionpack (3.2.0) lib/action_view/helpers/tag_helper.rb:91:in `content_tag'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:123:in `content_tag_with_haml'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:40:in `field_wrapper_for'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:28:in `block (2 levels) in fieldset_for'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:28:in `map'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:28:in `block in fieldset_for'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
haml (3.1.4) lib/haml/helpers/xss_mods.rb:109:in `with_output_buffer_with_haml_xss'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `capture'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:105:in `capture_with_haml'
actionpack (3.2.0) lib/action_view/helpers/tag_helper.rb:91:in `content_tag'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:123:in `content_tag_with_haml'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:24:in `fieldset_for'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:17:in `block in generate'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:16:in `map'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/form_builder.rb:16:in `generate'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/views/rails_admin/main/edit.html.haml:2:in `block in __mnt_data_myapp_shared_bundle_ruby_______bundler_gems_rails_admin____________f_app_views_rails_admin_main_edit_html_haml__2936297698482363203_49865300'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:181:in `call'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:181:in `block (2 levels) in form_for_with_haml'
haml (3.1.4) lib/haml/helpers.rb:255:in `with_tabs'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:181:in `block in form_for_with_haml'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
haml (3.1.4) lib/haml/helpers/xss_mods.rb:109:in `with_output_buffer_with_haml_xss'
actionpack (3.2.0) lib/action_view/helpers/capture_helper.rb:40:in `capture'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:105:in `capture_with_haml'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:606:in `fields_for'
actionpack (3.2.0) lib/action_view/helpers/form_helper.rb:377:in `form_for'
haml (3.1.4) lib/haml/helpers/action_view_mods.rb:183:in `form_for_with_haml'
haml (3.1.4) lib/haml/helpers/xss_mods.rb:132:in `form_for_with_haml_xss'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/helpers/rails_admin/main_helper.rb:7:in `rails_admin_form_for'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/app/views/rails_admin/main/edit.html.haml:1:in `__mnt_data_myapp_shared_bundle_ruby_______bundler_gems_rails_admin____________f_app_views_rails_admin_main_edit_html_haml__2936297698482363203_49865300'
actionpack (3.2.0) lib/action_view/template.rb:143:in `block in render'
activesupport (3.2.0) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.0) lib/action_view/template.rb:141:in `render'
actionpack (3.2.0) lib/action_view/renderer/template_renderer.rb:41:in `block (2 levels) in render_template'
actionpack (3.2.0) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (3.2.0) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.0) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.0) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (3.2.0) lib/action_view/renderer/template_renderer.rb:40:in `block in render_template'
actionpack (3.2.0) lib/action_view/renderer/template_renderer.rb:48:in `render_with_layout'
actionpack (3.2.0) lib/action_view/renderer/template_renderer.rb:39:in `render_template'
actionpack (3.2.0) lib/action_view/renderer/template_renderer.rb:12:in `render'
actionpack (3.2.0) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.2.0) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.0) lib/abstract_controller/rendering.rb:109:in `_render_template'
actionpack (3.2.0) lib/action_controller/metal/streaming.rb:225:in `_render_template'
actionpack (3.2.0) lib/abstract_controller/rendering.rb:103:in `render_to_body'
actionpack (3.2.0) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
actionpack (3.2.0) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
actionpack (3.2.0) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.0) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.2.0) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
activesupport (3.2.0) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/usr/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
activesupport (3.2.0) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.2.0) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
actionpack (3.2.0) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
activerecord (3.2.0) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
actionpack (3.2.0) lib/action_controller/metal/instrumentation.rb:39:in `render'
remotipart (1.0.2) lib/remotipart/render_overrides.rb:8:in `render'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/lib/rails_admin/config/actions/edit.rb:21:in `block (4 levels) in '
actionpack (3.2.0) lib/action_controller/metal/mime_responds.rb:195:in `call'
actionpack (3.2.0) lib/action_controller/metal/mime_responds.rb:195:in `respond_to'
/myapp_path//shared/bundle/ruby/1.9.1/bundler/gems/rails_admin-05315224490f/lib/rails_admin/config/actions/edit.rb:20:in `block (2 levels) in '
(eval):9:in `instance_eval'
(eval):9:in `edit'
actionpack (3.2.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.0) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.0) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.0) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.0) lib/active_support/callbacks.rb:491:in `_run__712079326750545375__process_action__810452953766824551__callbacks'
activesupport (3.2.0) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.0) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.0) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.0) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.0) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.0) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.0) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
activerecord (3.2.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:34:in `block in process_action'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:255:in `block in perform_action_with_newrelic_trace'
newrelic_rpm (3.3.1) lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:250:in `perform_action_with_newrelic_trace'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:33:in `process_action'
actionpack (3.2.0) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.0) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.0) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.0) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.0) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:66:in `call'
actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:66:in `dispatch'
actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:30:in `call'
journey (1.0.1) lib/journey/router.rb:68:in `block in call'
journey (1.0.1) lib/journey/router.rb:56:in `each'
journey (1.0.1) lib/journey/router.rb:56:in `call'
actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:570:in `call'
railties (3.2.0) lib/rails/engine.rb:479:in `call'
railties (3.2.0) lib/rails/railtie/configurable.rb:30:in `method_missing'
journey (1.0.1) lib/journey/router.rb:68:in `block in call'
journey (1.0.1) lib/journey/router.rb:56:in `each'
journey (1.0.1) lib/journey/router.rb:56:in `call'
actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:570:in `call'
rack-pjax (0.5.7) lib/rack/pjax.rb:12:in `call'
omniauth (1.0.2) lib/omniauth/strategy.rb:168:in `call!'
omniauth (1.0.2) lib/omniauth/strategy.rb:148:in `call'
newrelic_rpm (3.3.1) lib/new_relic/rack/browser_monitoring.rb:23:in `call'
warden (1.1.0) lib/warden/manager.rb:35:in `block in call'
warden (1.1.0) lib/warden/manager.rb:34:in `catch'
warden (1.1.0) lib/warden/manager.rb:34:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/head.rb:14:in `call'
remotipart (1.0.2) lib/remotipart/middleware.rb:30:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.0) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.0) lib/active_support/callbacks.rb:405:in `_run__2606656878487081079__call__415961845225187871__callbacks'
activesupport (3.2.0) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.0) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.0) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.0) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.0) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.0) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
railties (3.2.0) lib/rails/engine.rb:479:in `call'
railties (3.2.0) lib/rails/application.rb:220:in `call'
railties (3.2.0) lib/rails/railtie/configurable.rb:30:in `method_missing'
unicorn (4.2.0) lib/unicorn/http_server.rb:530:in `process_client'
unicorn (4.2.0) lib/unicorn/http_server.rb:604:in `worker_loop'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:17:in `call'
newrelic_rpm (3.3.1) lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:17:in `block (4 levels) in '
unicorn (4.2.0) lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
unicorn (4.2.0) lib/unicorn/http_server.rb:137:in `start'
unicorn (4.2.0) bin/unicorn:121:in `'
/myapp_path//shared/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
/myapp_path//shared/bundle/ruby/1.9.1/bin/unicorn:19:in `

'