Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyopicVicar fails with error "undefined method `to_key' on nil:NilClass" under rbx #2128

Closed
diegoviola opened this issue Jan 18, 2013 · 2 comments

Comments

@diegoviola
Copy link

Installation instructions here: https://github.com/FreeUKGen/MyopicVicar/wiki/Installation-Instructions

Ignore the rvm install 1.9.3 part and use rvm install rbx --1.9 instead.

For some reason the app fails with this error when I run it under rbx (1.9 mode):

Started GET "/admin/uploads" for 127.0.0.1 at 2013-01-17 18:28:02 -0300
Processing by Admin::UploadsController#index as HTML
  Rendered /home/diego/.rvm/gems/rbx-head@mv/gems/activeadmin-0.4.4/app/views/active_admin/resource/index.html.arb (44.7ms)
Completed 500 Internal Server Error in 52ms

ActionView::Template::Error (undefined method `to_key' on nil:NilClass.):
    1: render renderer_for(:index)
  kernel/delta/kernel.rb:81:in `to_key (method_missing)'
  actionpack (3.2.3) lib/action_controller/record_identifier.rb:76:in `record_key_for_dom_id'
  actionpack (3.2.3) lib/action_controller/record_identifier.rb:57:in `dom_id'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:45:in `dom_id (method_missing)'
  activeadmin (0.4.4) lib/active_admin/views/components/table_for.rb:88:in `build_table_body'
  plucky (0.4.4) lib/plucky/query.rb:86:in `each'
  mongo (1.6.2) lib/mongo/cursor.rb:291:in `each'
  plucky (0.4.4) lib/plucky/query.rb:86:in `each'
  activeadmin (0.4.4) lib/active_admin/views/components/table_for.rb:88:in `build_table_body'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `tbody'
  activeadmin (0.4.4) lib/active_admin/views/components/table_for.rb:86:in `build_table_body'
  activeadmin (0.4.4) lib/active_admin/views/components/table_for.rb:53:in `build_table'
  activeadmin (0.4.4) lib/active_admin/views/components/table_for.rb:15:in `build'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:59:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:58:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/views/index_as_table.rb:111:in `table_for'
  activeadmin (0.4.4) lib/active_admin/views/index_as_table.rb:104:in `build'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:63:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/views/pages/index.rb:106:in `render_index'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `div'
  activeadmin (0.4.4) lib/active_admin/views/pages/index.rb:105:in `render_index'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `paginated_collection'
  activeadmin (0.4.4) lib/active_admin/views/pages/index.rb:101:in `render_index'
  activeadmin (0.4.4) lib/active_admin/views/pages/index.rb:21:in `main_content'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:117:in `build_main_content_wrapper'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `div'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:116:in `build_main_content_wrapper'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `div'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:115:in `build_main_content_wrapper'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:99:in `build_page_content'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `div'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:98:in `build_page_content'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:42:in `build_page'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:68:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `with_current_dom_context'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:67:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/html/element.rb:17:in `div'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:39:in `build_page'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:96:in `within (with_current_dom_context)'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:38:in `build_page'
  activeadmin (0.4.4) lib/active_admin/views/pages/base.rb:10:in `build'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:63:in `build_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:77:in `insert_tag'
  activeadmin (0.4.4) lib/active_admin/arbre/builder.rb:41:in `insert_tag (method_missing)'
  activeadmin (0.4.4) lib/active_admin/view_helpers/renderer_helper.rb:21:in `render'
  activeadmin (0.4.4) app/views/active_admin/resource/index.html.arb:1:in `__home_diego__rvm_gems_rbx_head_mv_gems_activeadmin_______app_views_active_admin_resource_index_html_arb__3767530049344866080_301260'
  actionpack (3.2.3) lib/action_view/template.rb:143:in `render'
  activesupport (3.2.3) lib/active_support/notifications.rb:125:in `instrument'
  actionpack (3.2.3) lib/action_view/template.rb:141:in `render'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
  actionpack (3.2.3) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  activesupport (3.2.3) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.3) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.3) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:46:in `render_template'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:45:in `render_template'
  actionpack (3.2.3) lib/action_view/renderer/template_renderer.rb:18:in `render'
  actionpack (3.2.3) lib/action_view/renderer/renderer.rb:36:in `render_template'
  actionpack (3.2.3) lib/action_view/renderer/renderer.rb:17:in `render'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:110:in `_render_template'
  actionpack (3.2.3) lib/action_controller/metal/streaming.rb:225:in `_render_template'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:103:in `render_to_body'
  actionpack (3.2.3) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
  actionpack (3.2.3) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:88:in `render'
  actionpack (3.2.3) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:40:in `render'
  activesupport (3.2.3) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  /home/diego/.rvm/rubies/rbx-head/lib/benchmark.rb:304:in `measure'
  /home/diego/.rvm/rubies/rbx-head/lib/benchmark.rb:318:in `realtime'
  activesupport (3.2.3) lib/active_support/core_ext/benchmark.rb:5:in `ms'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:40:in `render'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
  activerecord (3.2.3) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:39:in `render'
  activeadmin (0.4.4) lib/active_admin/resource_controller/actions.rb:13:in `index'
  actionpack (3.2.3) lib/action_controller/metal/responder.rb:230:in `default_render'
  actionpack (3.2.3) lib/action_controller/metal/responder.rb:160:in `to_html'
  responders (0.9.1) lib/responders/flash_responder.rb:104:in `to_html'
  actionpack (3.2.3) lib/action_controller/metal/responder.rb:153:in `respond'
  actionpack (3.2.3) lib/action_controller/metal/responder.rb:146:in `call'
  actionpack (3.2.3) lib/action_controller/metal/mime_responds.rb:239:in `respond_with'
  inherited_resources (1.3.1) lib/inherited_resources/actions.rb:7:in `index'
  activeadmin (0.4.4) lib/active_admin/resource_controller/actions.rb:11:in `index'
  actionpack (3.2.3) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.3) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.3) lib/abstract_controller/callbacks.rb:18:in `process_action'
  activesupport (3.2.3) lib/active_support/callbacks.rb:447:in `_run__3829735288484371070__process_action__3403725937584099980__callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.3) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  activesupport (3.2.3) lib/active_support/notifications.rb:123:in `instrument'
  activesupport (3.2.3) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.3) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.3) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.3) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
  activerecord (3.2.3) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (3.2.3) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.3) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.3) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.3) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.3) lib/action_controller/metal.rb:246:in `action'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.3) lib/journey/router.rb:68:in `call'
  kernel/bootstrap/array.rb:68:in `each'
  journey (1.0.3) lib/journey/router.rb:56:in `call'
  actionpack (3.2.3) lib/action_dispatch/routing/route_set.rb:600:in `call'
  sass (3.1.19) lib/sass/plugin/rack.rb:54:in `call'
  mongo_mapper (0.11.1) lib/mongo_mapper/middleware/identity_map.rb:10:in `call'
  warden (1.1.1) lib/warden/manager.rb:35:in `call'
  kernel/common/throw_catch19.rb:8:in `catch'
  kernel/common/throw_catch.rb:10:in `register'
  kernel/common/throw_catch19.rb:7:in `catch'
  warden (1.1.1) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.3) 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.3) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.3) 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.3) lib/action_dispatch/middleware/cookies.rb:338:in `call'
  activerecord (3.2.3) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `_run__4462349280423080286__call__1338411874204908663__callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.3) 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.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.1) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in `call'
  railties (3.2.3) lib/rails/engine.rb:479:in `call'
  railties (3.2.3) lib/rails/application.rb:220:in `call'
  rack (1.4.1) lib/rack/content_length.rb:14:in `call'
  railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in `call'
  rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
  /home/diego/.rvm/rubies/rbx-head/lib/19/webrick/httpserver.rb:138:in `service'
  /home/diego/.rvm/rubies/rbx-head/lib/19/webrick/httpserver.rb:94:in `run'
  /home/diego/.rvm/rubies/rbx-head/lib/19/webrick/server.rb:191:in `start_thread'
  kernel/bootstrap/thread19.rb:41:in `__run__'


  Rendered /home/diego/.rvm/gems/rbx-head@mv/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (7.4ms)
  Rendered /home/diego/.rvm/gems/rbx-head@mv/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (4.9ms)
  Rendered /home/diego/.rvm/gems/rbx-head@mv/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (20.4ms)

But when I run it with MRI 1.9.3 it's ok.

In order to reproduce that error, just start a new rails console and create an Upload record, like this:

cd  MyopicVicar
rails c
u = Upload.new
u.save(:validate => false)

Then go to http://127.0.0.1:3000/admin/uploads and you should get that error under RBX.

@dbussink
Copy link
Contributor

This still is a bug that would need fixing in Rubinius, but I've also opened a pull request with active_admin to properly use a normal variable: activeadmin/activeadmin#1871

I'm closing this one, since we already have an issue open for that _ issue: #1697

@diegoviola
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants