1

我正在乘客身上运行 rails 3 应用程序。登录时,我会定期收到以下错误。这似乎是随机发生的。起初它并不常见,然后自行消失了。现在它变成了一个更大的问题。任何帮助,将不胜感激。谢谢

ActiveRecord::UnknownAttributeError in LoginController#index

unknown attribute: session_id

Rails.root: /var/www/apps/myapp/releases/20120501181816
Application Trace | Framework Trace | Full Trace

activerecord (3.2.2) lib/active_record/attribute_assignment.rb:88:in `block in assign_attributes'
activerecord (3.2.2) lib/active_record/attribute_assignment.rb:78:in `each'
activerecord (3.2.2) lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
activerecord (3.2.2) lib/active_record/base.rb:495:in `initialize'
activerecord (3.2.2) lib/active_record/session_store.rb:130:in `initialize'
activerecord (3.2.2) lib/active_record/session_store.rb:310:in `new'
activerecord (3.2.2) lib/active_record/session_store.rb:310:in `block in get_session'
activesupport (3.2.2) lib/active_support/benchmarkable.rb:50:in `silence'
activerecord (3.2.2) lib/active_record/session_store.rb:305:in `get_session'
rack (1.4.1) lib/rack/session/abstract/id.rb:246:in `load_session'
actionpack (3.2.2) lib/action_dispatch/middleware/session/abstract_store.rb:47:in `block in load_session'
actionpack (3.2.2) lib/action_dispatch/middleware/session/abstract_store.rb:55:in `stale_session_check!'
actionpack (3.2.2) lib/action_dispatch/middleware/session/abstract_store.rb:47:in `load_session'
rack (1.4.1) lib/rack/session/abstract/id.rb:130:in `load!'
rack (1.4.1) lib/rack/session/abstract/id.rb:126:in `load_for_write!'
rack (1.4.1) lib/rack/session/abstract/id.rb:71:in `[]='
actionpack (3.2.2) lib/action_dispatch/middleware/flash.rb:249: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.2) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.2) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `_run__1318401008379964085__call__2594406452281670030__callbacks'
activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.2) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.2) 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.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
railties (3.2.2) lib/rails/engine.rb:479:in `call'
railties (3.2.2) lib/rails/application.rb:220:in `call'
railties (3.2.2) lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/utils.rb:479:in `safe_fork'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:180:in `start'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
<internal:prelude>:10:in `synchronize'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/home/rails/.rvm/gems/ruby-1.9.2-p318/gems/passenger-3.0.11/helper-scripts/passenger-spawn-server:99:in `<main>'
4

1 回答 1

0

你不是在配置session_idconfig.log_tags?如果是这样,删除它可能会有所帮助。

于 2012-05-23T00:04:21.340 回答