Steve Koppelman
2006-Jul-25 03:13 UTC
[Rails] Errors logged but not returned to browser, WEBrick hangs
An app I''ve been developing has been chugging along nicely, but around the time I added a new join model a couple of commits ago, my development environment has been acting screwy. 1. When there''s an error, the error messages and tracebacks are not being returned to the browser. The browser keeps the connection alive indefinitely. 2. Stopping the request from the browser side does not release WEBrick. The WEBrick process sits and slowly takes up more and more memory until I kill it. 3. The error message and traceback are being logged to development.log as usual In order to illsutrate, I placed an error near the top of my ApplicationHelper, and I get the following. Please note that the "undefined" for_this_agent() method cited in the traceback is simply the first method from ApplicationHelper that gets called on the URL I requested. It is not the problem. It''s simply the call that triggers parsing the helper...and hanging WEBrick in order to demonstrate. Incidentally, AdminHelper exists and conists of nothing but module AdminHelper end Any insight would be helpful. ------ ApplicationController: missing default helper module ApplicationHelper AdminController: missing default helper module AdminHelper Masteragent Columns (0.010000) SHOW FIELDS FROM users Agent Columns (0.000000) SHOW FIELDS FROM users Role Columns (0.000000) SHOW FIELDS FROM roles Processing AdminController#edit (for 127.0.0.1 at 2006-07-24 22:57:46) [GET] Session ID: ae65e0035db2a018aa8f58178aa67778 Parameters: {"action"=>"edit", "id"=>"11", "controller"=>"admin"} required_perm is admin/edit Permission Load (0.000000) FROM permissions, roles, permissions_roles, users_roles, users WHERE users.id = 4 AND users.id = users_roles.user_id AND users_roles.role_id = roles.id AND roles.id = permissions_roles.role_id AND permissions_roles.permission_id = permissions.id AND permissions.controller = ''admin'' AND permissions.action = ''edit'' Cmaform Load (0.000000) SELECT * FROM cmaforms WHERE (cmaforms.id = ''11'') LIMIT 1 NoMethodError (undefined method `for_this_agent'' for #<AdminController:0x55dbec8>): /app/controllers/admin_controller.rb:106:in `edit'' /vendor/rails/actionpack/lib/action_controller/base.rb:910:in `send'' /vendor/rails/actionpack/lib/action_controller/base.rb:910:in `perform_action_without_filters'' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `measure'' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform_action'' /vendor/rails/actionpack/lib/action_controller/base.rb:381:in `send'' /vendor/rails/actionpack/lib/action_controller/base.rb:381:in `process_without_filters'' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' /vendor/rails/actionpack/lib/action_controller/session_management.rb:117:in `process'' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'' /vendor/rails/railties/lib/webrick_server.rb:115:in `handle_dispatch'' /vendor/rails/railties/lib/webrick_server.rb:81:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' /vendor/rails/railties/lib/webrick_server.rb:67:in `dispatch'' /vendor/rails/railties/lib/commands/servers/webrick.rb:59 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' /vendor/rails/activesupport/lib/active_support/dependencies.rb:147:in `require'' /vendor/rails/railties/lib/commands/server.rb:30 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' ./script/server:3 -e:4:in `load'' -e:4 -- Posted via http://www.ruby-forum.com/.
Possibly Parallel Threads
- Get value from form using rjs, and problem with Safari
- Getting value of form using Ajax (and problems with Safari)
- Same .rhtml and partial in mailer and non-mailer contexts
- Rake + SQL Server + Migrations == Errors. Help?!
- user engine: Role.count() is zero in tests