NoMethodError in CardController#index

Support Ticket

+status
closed
 
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
rails 2.3.5
Using Passenger on Dreamhost

After following the git type install this error appears when attempting to visit the install in a browser.

undefined method `system_prefix=' for nil:NilClass

Thanks for taking a look at this.
Full Trace below in +example

/home/user/<domain>/lib/wagn/cache.rb:33:in `re_initialize_for_new_request'
/home/user/<domain>/app/controllers/application_controller.rb:50:in `per_request_setup'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `evaluate_method'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:225:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:629:in `run_before_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:615:in `call_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `send'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in `process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:437:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:87:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in `_call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call'
/home/mitzip/.gems/gems/hoptoad_notifier-2.4.5/lib/hoptoad_notifier/rack.rb:27:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call'
/home/mitzip/.gems/gems/hoptoad_notifier-2.4.5/lib/hoptoad_notifier/user_informer.rb:12:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call'
/dh/passenger/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/utils.rb:184:in `safe_fork'
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:349:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:163:in `start'
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
/dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/dh/passenger/bin/passenger-spawn-server:61
 

Can you check to make sure your schema is correctly loaded?  Meaning, look in the database, examine the cards table, and make sure it is actually populated with some cards.

 

It looks to me like your cache is not getting initialized, which cannot happen when your schema is not loaded.  If this hunch is correct, then something has gone wrong early in the process, perhaps with rake wagn:create.


The caching and #index handling has since been rewritten. closing.

  --Ethan McCutchen.....Fri Feb 03 09:11:12 -0800 2012