Project

General

Profile

Actions

Defect #1234

closed

NoMethodError causes HTTP 500 error

Added by Steve Woodrow over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
2008-05-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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.

Actions #1

Updated by Thomas Lecavelier over 16 years ago

It looks like a passenger relative problem. Can you give more informations, like the output of:

ruby script/about

Please?

Actions #2

Updated by Steve Woodrow over 16 years ago

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.

Actions #3

Updated by Jean-Philippe Lang over 16 years ago

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 ?

Actions #4

Updated by Thomas Lecavelier over 16 years ago

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.

Actions #5

Updated by Steve Woodrow over 16 years ago

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!

Actions #6

Updated by Steve Woodrow over 16 years ago

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.

Actions #7

Updated by Jean-Philippe Lang over 16 years ago

  • Category set to Wiki
  • Status changed from New to Closed
  • Affected version (unused) deleted (0.7.0)
  • Resolution set to Invalid

OK Steve, reopen this ticket if needed.

Actions #8

Updated by Paul Rivier over 16 years ago

FWIW, I'm experiencing the same issues, with redmine 7.1 and Passenger.

Actions

Also available in: Atom PDF