Defect #1234
NoMethodError causes HTTP 500 error
| Status: | Closed | Start: | 2008-05-13 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Wiki | |||
| Target version: | - | |||
| Affected version: | Resolution: | Invalid |
||
Description
This error occurred while accessing the wiki ("Processing WikiController#index" in the log) but seemed to crash the entire application. Trace from log attached below:
NoMethodError (undefined method `find_by_name' for #<Class:0xb67a4ad4>):
/vendor/rails/activerecord/lib/active_record/base.rb:1483:in `method_missing'
/app/models/setting.rb:122:in `find_or_default'
/app/models/setting.rb:68:in `[]'
/app/models/setting.rb:101:in `login_required?'
/app/controllers/application.rb:58:in `check_if_login_required'
/vendor/rails/actionpack/lib/action_controller/filters.rb:469:in `send!'
/vendor/rails/actionpack/lib/action_controller/filters.rb:469:in `call'
/vendor/rails/actionpack/lib/action_controller/filters.rb:441:in `run'
/vendor/rails/actionpack/lib/action_controller/filters.rb:716:in `run_before_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:695:in `call_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
/vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `passenger_orig_perform_action'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
/vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `passenger_orig_perform_action'
/usr/lib/ruby/site_ruby/passenger/request_handler.rb:139:in `perform_action'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
/vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/lib/ruby/site_ruby/passenger/request_handler.rb:294:in `process_request'
/usr/lib/ruby/site_ruby/passenger/request_handler.rb:174:in `main_loop'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:286:in `start_request_handler'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:255:in `handle_spawn_application'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:253:in `fork'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:253:in `handle_spawn_application'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:251:in `fork'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:251:in `handle_spawn_application'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:291:in `__send__'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:291:in `main_loop'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:147:in `start_synchronously'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:114:in `start'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:108:in `fork'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:108:in `start'
/usr/lib/ruby/site_ruby/passenger/application_spawner.rb:147:in `start'
/usr/lib/ruby/site_ruby/passenger/framework_spawner.rb:278:in `handle_spawn_application'
/usr/lib/ruby/site_ruby/passenger/framework_spawner.rb:273:in `synchronize'
/usr/lib/ruby/site_ruby/passenger/framework_spawner.rb:273:in `handle_spawn_application'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:291:in `__send__'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:291:in `main_loop'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:147:in `start_synchronously'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:114:in `start'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:108:in `fork'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:108:in `start'
/usr/lib/ruby/site_ruby/passenger/framework_spawner.rb:104:in `start'
/usr/lib/ruby/site_ruby/passenger/spawn_manager.rb:106:in `spawn_application'
/usr/lib/ruby/site_ruby/passenger/spawn_manager.rb:102:in `synchronize'
/usr/lib/ruby/site_ruby/passenger/spawn_manager.rb:102:in `spawn_application'
/usr/lib/ruby/site_ruby/passenger/spawn_manager.rb:178:in `handle_spawn_application'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:291:in `__send__'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:291:in `main_loop'
/usr/lib/ruby/site_ruby/passenger/abstract_server.rb:147:in `start_synchronously'
/usr/bin/passenger-spawn-server:31
Rendering /var/www/redmine/redmine-0.7.0/public/500.html (500 Internal Server Error)
I just realized that 0.7.1 is now available. If this problem was fixed in 0.7.1, my apologies.
History
2008-05-14 10:52 - Thomas Lecavelier
ruby script/about
Please?
2008-05-14 14:05 - Steve Woodrow
Here is the output of ruby script/about:
About your application's environment Ruby version 1.8.6 (i686-linux) RubyGems version 0.9.4 Rails version 2.0.2 Active Record version 2.0.2 Action Pack version 2.0.2 Active Resource version 2.0.2 Action Mailer version 2.0.2 Active Support version 2.0.2 Edge Rails revision rel_2-0-2 Application root /var/www/redmine/redmine-0.7.0 Environment development Database adapter mysql
Please update with any other requests for information; I would be happy to help. Thanks.
2008-05-14 19:09 - Jean-Philippe Lang
I'm not able to reproduce.
Could check the 'settings' table in your Redmine database and see if there is a column 'name'.
Do you get this error only when viewing the wiki ? Finally, could you try to restart the app and maybe upgrade to 0.7.1 ?
2008-05-15 11:32 - Thomas Lecavelier
Steve, if you upgrade something on your box, think about upgrading your gem version: 0.9.4 is very old. 1.1.1 should be far better.
2008-05-15 17:40 - Steve Woodrow
I've upgraded Redmine to 0.7.1 and will see what happens.
To clarify, this error only occurs sporadically, but when it does occur I need to restart apache. Thinking about it more, this leads me to believe it's more likely a Phusion Passenger (mod_rails) issue. Perhaps you want to close this issue until (if ever) it becomes clear that the fault lies with Redmine?
Also, re: a gems version of 0.9.4, I will try upgrading -- the higher-version packages on Portage (I'm running Gentoo) are not marked for release just yet, but I'll give them a shot.
Thanks!
2008-05-15 17:43 - Steve Woodrow
Also, with respect to Jean-Philippe's question (http://www.redmine.org/issues/show/1234#note-3), yes, there is a column 'name' in the 'settings' table.
2008-05-16 17:22 - Jean-Philippe Lang
- Category set to Wiki
- Status changed from New to Closed
- Affected version deleted (
0.7.0) - Resolution set to Invalid
OK Steve, reopen this ticket if needed.