karmi/tire — comment on commit 83f776db4ce3a29de9f7288cfd5e16fa230ccecc
File:  line 0
By bobbytables:

The problem exists when mapping is called on a model (which is when it's instantiated). See backtrace.

```
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient/request.rb:182:in `rescue in transmit'
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient/request.rb:140:in `transmit'
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
[GEM_ROOT]/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
[GEM_ROOT]/bundler/gems/tire-83f776db4ce3/lib/tire/http/client.rb:19:in `post'
[GEM_ROOT]/bundler/gems/tire-83f776db4ce3/lib/tire/index.rb:59:in `store'
[GEM_ROOT]/bundler/gems/tire-83f776db4ce3/lib/tire/model/search.rb:134:in `block in update_index'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:390:in `_run_update_elasticsearch_index_callbacks'
[GEM_ROOT]/bundler/gems/tire-83f776db4ce3/lib/tire/model/search.rb:130:in `update_index'
[GEM_ROOT]/bundler/gems/tire-83f776db4ce3/lib/tire/model/callbacks.rb:21:in `block in included'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:423:in `_run_save_callbacks'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/callbacks.rb:264:in `create_or_update'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/persistence.rb:37:in `save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/validations.rb:50:in `save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/attribute_methods/dirty.rb:22:in `save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:208:in `transaction'
[GEM_ROOT]/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:491:in `block in transaction_with_trace_ActiveRecord_self_name_transaction'
[GEM_ROOT]/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
[GEM_ROOT]/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:486:in `transaction_with_trace_ActiveRecord_self_name_transaction'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:241:in `block in save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:240:in `save'
app/models/order_item.rb:155:in `fulfill_item'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/eval_helpers.rb:56:in `evaluate_method'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:191:in `block in run_methods'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:190:in `each'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:190:in `run_methods'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:159:in `call'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:408:in `before'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:236:in `block in run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:338:in `block in pausable'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:338:in `catch'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:338:in `pausable'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:236:in `run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:126:in `run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:211:in `run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:63:in `catch'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:63:in `block in perform'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:185:in `within_transaction'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:62:in `perform'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/integrations/active_model.rb:466:in `around_validation'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:302:in `_callback_around_1176'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:206:in `_conditional_callback_around_1178'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:390:in `_run_validation_callbacks'
[GEM_ROOT]/gems/activesupport-3.1.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
[GEM_ROOT]/gems/activemodel-3.1.3/lib/active_model/validations/callbacks.rb:53:in `run_validations!'
[GEM_ROOT]/gems/activemodel-3.1.3/lib/active_model/validations.rb:179:in `valid?'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/validations.rb:69:in `valid?'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/validations.rb:77:in `perform_validations'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/validations.rb:50:in `save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/attribute_methods/dirty.rb:22:in `save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:208:in `transaction'
[GEM_ROOT]/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:491:in `block in transaction_with_trace_ActiveRecord_self_name_transaction'
[GEM_ROOT]/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
[GEM_ROOT]/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:486:in `transaction_with_trace_ActiveRecord_self_name_transaction'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:241:in `block in save'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/transactions.rb:240:in `save'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:153:in `block (2 levels) in run_actions'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:153:in `each'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:153:in `block in run_actions'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:169:in `catch_exceptions'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:147:in `run_actions'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:60:in `perform'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:209:in `perform'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/event.rb:158:in `fire'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/event.rb:218:in `block in add_actions'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/machine.rb:704:in `call'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/machine.rb:704:in `block (2 levels) in define_helper'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/event.rb:223:in `block in add_actions'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/machine.rb:704:in `call'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/machine.rb:704:in `block (2 levels) in define_helper'
app/models/order.rb:173:in `block in fulfill_items'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/associations/collection_proxy.rb:91:in `each'
[GEM_ROOT]/gems/activerecord-3.1.3/lib/active_record/associations/collection_proxy.rb:91:in `method_missing'
app/models/order.rb:172:in `fulfill_items'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/eval_helpers.rb:56:in `evaluate_method'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:191:in `block in run_methods'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:190:in `each'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:190:in `run_methods'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/callback.rb:159:in `call'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:408:in `before'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:236:in `block in run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:338:in `block in pausable'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:338:in `catch'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:338:in `pausable'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition.rb:236:in `run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:126:in `run_callbacks'
[GEM_ROOT]/gems/state_machine-1.0.2/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
```