This project is archived and is in readonly mode.

#4781 open
Sam Ruby

rjs function tests fail

Reported by Sam Ruby | June 6th, 2010 @ 11:41 PM | in 3.0.6

function tests involving xhr requests to rjs templates on Ruby 1.8.7 produce

NoMethodError: undefined method 'size' for :js:Symbol

Broken by commit http://github.com/rails/rails/commit/a6b39428431abeaa0251bbf4b6582e....

testcase, output (Ruby 1.8.7), git bisect

The same test passes on Ruby 1.9.2: output

Comments and changes to this ticket

  • Sam Ruby

    Sam Ruby June 6th, 2010 @ 11:51 PM

    It is not just function tests, actual use of RJS fails, and does so much more helpfully as there is a stack traceback:

    NoMethodError (undefined method `size' for :js:Symbol):
    /home/rubys/git/rails/actionpack/lib/action_view/lookup_context.rb:149:in `formats='
      /home/rubys/git/rails/actionpack/lib/action_view/lookup_context.rb:195:in `send'
      /home/rubys/git/rails/actionpack/lib/action_view/lookup_context.rb:195:in `update_details'
      /home/rubys/git/rails/actionpack/lib/action_view/lookup_context.rb:194:in `each'
      /home/rubys/git/rails/actionpack/lib/action_view/lookup_context.rb:194:in `update_details'
      /home/rubys/git/rails/actionpack/lib/action_view/base.rb:186:in `__send__'
      /home/rubys/git/rails/actionpack/lib/action_view/base.rb:186:in `update_details'
      /home/rubys/git/rails/actionpack/lib/action_view/render/layouts.rb:68:in `find_layout'
      /home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:53:in `_render_template'
      /home/rubys/git/rails/actionpack/lib/action_view/render/rendering.rb:25:in `render'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:114:in `_render_template'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:108:in `render_to_body'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/renderers.rb:47:in `render_to_body'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/compatibility.rb:55:in `render_to_body'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:101:in `render_to_string'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:92:in `render'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:17:in `render'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
      /home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/benchmark.rb:308:in `realtime'
      /home/rubys/git/rails/activesupport/lib/active_support/core_ext/benchmark.rb:5:in `ms'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:39:in `render'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:77:in `cleanup_view_runtime'
      /home/rubys/git/rails/activerecord/lib/active_record/railties/controller_runtime.rb:15:in `cleanup_view_runtime'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:38:in `render'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:258
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:189:in `call'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/mime_responds.rb:189:in `respond_to'
      /home/rubys/git/awdwr/work/depot/app/controllers/store_controller.rb:19:in `add_to_cart'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:145:in `process_action'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/rendering.rb:11:in `process_action'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:18:in `process_action'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:448:in `_run__1297800236__process_action__746879535__callbacks'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:408:in `send'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:408:in `_run_process_action_callbacks'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:88:in `send'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:88:in `run_callbacks'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
      /home/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
      /home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:48:in `__send__'
      /home/rubys/git/rails/activesupport/lib/active_support/notifications.rb:48:in `instrument'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/instrumentation.rb:28:in `process_action'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/rescue.rb:8:in `process_action'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/base.rb:114:in `process'
      /home/rubys/git/rails/actionpack/lib/abstract_controller/rendering.rb:40:in `process'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:126:in `dispatch'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
      /home/rubys/git/rails/actionpack/lib/action_controller/metal.rb:166
      /home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:27:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:27:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-mount-0.6.3/lib/rack/mount/route_set.rb:148:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-mount-0.6.3/lib/rack/mount/code_generation.rb:89:in `recognize'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-mount-0.6.3/lib/rack/mount/code_generation.rb:66:in `optimized_each'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-mount-0.6.3/lib/rack/mount/code_generation.rb:88:in `recognize'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-mount-0.6.3/lib/rack/mount/route_set.rb:139:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/routing/route_set.rb:454:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/flash.rb:177:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb:106:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/cookies.rb:235:in `call'
      /home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:31:in `call'
      /home/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
      /home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:11:in `cache'
      /home/rubys/git/rails/activerecord/lib/active_record/query_cache.rb:30:in `call'
      /home/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run_call_callbacks'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:88:in `send'
      /home/rubys/git/rails/activesupport/lib/active_support/callbacks.rb:88:in `run_callbacks'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/sendfile.rb:105:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:48:in `call'
      /home/rubys/git/rails/railties/lib/rails/rack/logger.rb:14:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/runtime.rb:17:in `call'
      /home/rubys/git/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
      /home/rubys/git/rails/actionpack/lib/action_dispatch/middleware/static.rb:30:in `call'
      /home/rubys/git/rails/railties/lib/rails/application.rb:145:in `call'
      /home/rubys/git/rails/railties/lib/rails/application.rb:81:in `send'
      /home/rubys/git/rails/railties/lib/rails/application.rb:81:in `method_missing'
      /home/rubys/git/rails/railties/lib/rails/rack/log_tailer.rb:15:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:95:in `start'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `each'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:92:in `start'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:23:in `start'
      /home/rubys/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/webrick/server.rb:82:in `start'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `run'
      /home/rubys/.rvm/gems/ruby-1.8.7-p249/gems/rack-1.1.0/lib/rack/server.rb:155:in `start'
      /home/rubys/git/rails/railties/lib/rails/commands/server.rb:62:in `start'
      /home/rubys/git/rails/railties/lib/rails/commands.rb:30
      /home/rubys/git/rails/railties/lib/rails/commands.rb:27:in `tap'
      /home/rubys/git/rails/railties/lib/rails/commands.rb:27
      script/rails:6:in `require'
      script/rails:6
    
  • Jeremy Kemper

    Jeremy Kemper June 7th, 2010 @ 01:58 AM

    Fixed by 83729e2fe36a0a629c2a5a52a7e2970287d57036, but needs a regression test.

  • Yehuda Katz (wycats)
  • Jeremy Kemper

    Jeremy Kemper August 30th, 2010 @ 04:10 AM

    • Milestone cleared.
    • Importance changed from “” to “Medium”
  • Jeremy Kemper

    Jeremy Kemper October 15th, 2010 @ 11:01 PM

    • Milestone set to 3.0.2
  • Ryan Bigg

    Ryan Bigg October 19th, 2010 @ 08:22 AM

    • Tag cleared.

    Automatic cleanup of spam.

  • Santiago Pastorino
  • Santiago Pastorino
  • Santiago Pastorino

    Santiago Pastorino February 27th, 2011 @ 03:15 AM

    • Milestone changed from 3.0.5 to 3.0.6

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages