Skip to content

Instantly share code, notes, and snippets.

@rterbush
Created May 21, 2013 21:09
Show Gist options
  • Save rterbush/5623280 to your computer and use it in GitHub Desktop.
Save rterbush/5623280 to your computer and use it in GitHub Desktop.
NoMethodError (undefined method `count_on_hand' for nil:NilClass):
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock_location.rb:50:in `fill_status'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock/packer.rb:19:in `block in default_package'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:89:in `each'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock/packer.rb:18:in `default_package'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock/packer.rb:13:in `packages'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock/coordinator.rb:21:in `block in build_packages'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/delegation.rb:6:in `each'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/relation/delegation.rb:6:in `each'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock/coordinator.rb:19:in `build_packages'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/stock/coordinator.rb:12:in `packages'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/core/app/models/spree/order.rb:540:in `create_proposed_shipments'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/eval_helpers.rb:58:in `evaluate_method'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/callback.rb:191:in `block in run_methods'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/callback.rb:190:in `each'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/callback.rb:190:in `run_methods'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/callback.rb:159:in `call'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:420:in `before'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:246:in `block in run_callbacks'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:348:in `block in pausable'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:348:in `catch'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:348:in `pausable'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:246:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:127:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:212:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `catch'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block in perform'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:186:in `within_transaction'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:62:in `perform'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block in around_save'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:530:in `block in transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:529:in `transaction'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:501:in `around_save'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:483:in `save'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:154:in `block (2 levels) in run_actions'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:154:in `each'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:154:in `block in run_actions'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:170:in `catch_exceptions'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:148:in `run_actions'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:60:in `perform'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/transition.rb:219:in `perform'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/event.rb:172:in `fire'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/event.rb:247:in `block in add_actions'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/machine.rb:765:in `call'
vendor/bundle/ruby/1.9.1/gems/state_machine-1.2.0/lib/state_machine/machine.rb:765:in `block (2 levels) in define_helper'
vendor/bundle/ruby/1.9.1/bundler/gems/spree-008ea0178f00/backend/app/controllers/spree/admin/orders/customer_details_controller.rb:20:in `update'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:167:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:513:in `_run__4272945330846761237__process_action__3985420322485816162__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `block in instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `instrument'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:121:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:in `process'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal.rb:203:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal.rb:246:in `block in action'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in `call'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in `call'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/query_cache.rb:64:in `call'
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `_run__316826453742942580__call__4504641925744110631__callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:in `call_app'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in `block in call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in `tagged'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in `call'
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:223:in `call'
vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb:470:in `safe_fork'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:180:in `start'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
<internal:prelude>:10:in `synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/local/rvm/gems/ruby-1.9.3-p374/gems/passenger-3.0.19/helper-scripts/passenger-spawn-server:99:in `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment