ArgumentError: missing required :bucket option for Jenkins CI server - ruby-on-rails

I am trying to upload an image to Amazon S3.
The model Card.rb has
has_attached_file :marketing_image, default_url: '',
styles: {:thumb => ['66x80>', :png]},
hash_secret: "marketing-image-magic",
url: "/system/:class/:attachment/:id_partition/:style/:hash.:extension",
storage: :s3,
s3_credentials: {
bucket: ENV['AWS_BUCKET_NAME'],
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] },
s3_permissions: :public_read,
s3_headers: { 'Cache-Control' => 'max-age=315576000',
'Expires' => 10.years.from_now.httpdate },
s3_protocol: 'https'
and the credentials are stored in .env file.
All the tests are green on localhost but some fail on CI Jenkins server.
The trace for one of the test case on CI server is:
CardTest#test_uses_image_validation_as_default:
ArgumentError: missing required :bucket option
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/storage/s3.rb:218:in `bucket_name'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/storage/s3.rb:251:in `s3_bucket'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/storage/s3.rb:255:in `s3_object'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/storage/s3.rb:297:in `exists?'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:557:in `block in queue_all_for_delete'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:556:in `map'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:556:in `queue_all_for_delete'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/has_attached_file.rb:92:in `block in add_active_record_callbacks'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:443:in `instance_exec'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:443:in `block in make_lambda'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:161:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:161:in `block in halting'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:501:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:501:in `block in call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:501:in `each'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:501:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:86:in `run_callbacks'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/callbacks.rb:292:in `destroy'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/transactions.rb:263:in `block in destroy'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/transactions.rb:208:in `transaction'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/transactions.rb:263:in `destroy'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/associations/has_one_association.rb:81:in `remove_target!'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/associations/has_one_association.rb:35:in `block in replace'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/associations/has_one_association.rb:101:in `transaction_if'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/associations/has_one_association.rb:34:in `replace'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/associations/has_one_association.rb:73:in `set_new_record'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/protected_attributes-1.0.9/lib/active_record/mass_assignment_security/associations.rb:121:in `build'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/associations/builder/singular_association.rb:18:in `build_card'
/var/lib/jenkins/jobs/PunchhServer/workspace/test/models/card_test.rb:14:in `test_uses_image_validation_as_default'
and one more
Api::V1::CardsControllerTest#test_index:
ArgumentError: missing required :bucket option
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/storage/s3.rb:218:in `bucket_name'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/storage/s3.rb:173:in `block in extended'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/interpolations.rb:34:in `block (2 levels) in interpolate'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/interpolations.rb:33:in `gsub'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/interpolations.rb:33:in `block in interpolate'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/interpolations.rb:32:in `each'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/interpolations.rb:32:in `inject'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/interpolations.rb:32:in `interpolate'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/url_generator.rb:13:in `for'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/paperclip-4.2.1/lib/paperclip/attachment.rb:143:in `url'
/var/lib/jenkins/jobs/PunchhServer/workspace/app/models/card.rb:131:in `marketing_image_url'
/var/lib/jenkins/jobs/PunchhServer/workspace/app/serializers/api_cardmeta.rb:121:in `marketing_image_url'
(eval):29:in `_fast_attributes'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/serializer.rb:467:in `rescue in attributes'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/serializer.rb:455:in `attributes'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/serializer.rb:479:in `_serializable_hash'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/serializer.rb:361:in `serializable_hash'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/array_serializer.rb:89:in `block in _serializable_array'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/array_serializer.rb:79:in `map'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/array_serializer.rb:79:in `_serializable_array'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/array_serializer.rb:73:in `serializable_array'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/array_serializer.rb:53:in `as_json'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/json/encoding.rb:34:in `encode'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/json/encoding.rb:21:in `encode'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/core_ext/object/json.rb:37:in `to_json_with_active_support_encoder'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/active_model/array_serializer.rb:63:in `to_json'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/renderers.rb:96:in `block in <module:Renderers>'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/active_model_serializers-0.8.2/lib/action_controller/serialization.rb:46:in `_render_option_json'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/renderers.rb:39:in `block in _handle_render_options'
/usr/local/lib/ruby/2.2.0/set.rb:283:in `each_key'
/usr/local/lib/ruby/2.2.0/set.rb:283:in `each'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/renderers.rb:36:in `_handle_render_options'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/renderers.rb:32:in `render_to_body'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/abstract_controller/rendering.rb:25:in `render'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/rendering.rb:16:in `render'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
/usr/local/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/core_ext/benchmark.rb:12:in `ms'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:43:in `render'
/var/lib/jenkins/jobs/PunchhServer/workspace/app/controllers/api/v1/cards_controller.rb:8:in `index'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:189:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:552:in `block (2 levels) in compile'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:86:in `run_callbacks'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `block in instrument'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `instrument'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.10/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:136:in `process'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionview-4.1.10/lib/action_view/rendering.rb:30:in `process'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/test_case.rb:595:in `process'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/apipie-rails-0.3.2/lib/apipie/extractor/recorder.rb:153:in `process_with_api_recording'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/test_case.rb:64:in `process'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/devise-3.3.0/lib/devise/test_helpers.rb:19:in `block in process'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/devise-3.3.0/lib/devise/test_helpers.rb:72:in `catch'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/devise-3.3.0/lib/devise/test_helpers.rb:72:in `_catch_warden'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/devise-3.3.0/lib/devise/test_helpers.rb:19:in `process'
/var/lib/jenkins/jobs/PunchhServer/workspace/vendor/bundle/ruby/2.2.0/gems/actionpack-4.1.10/lib/action_controller/test_case.rb:495:in `get'
/var/lib/jenkins/jobs/PunchhServer/workspace/test/controllers/api/v1/cards_controller_test.rb:60:in `test_index'
How can I remove this error?

Related

Debugging and resolving a Rails interlock issue

I've managed to consistently reproduce a deadlock situation (I believe) despite following the following resources:
https://guides.rubyonrails.org/threading_and_code_execution.html#executor
https://github.com/rails/rails/issues/27025#issuecomment-260169414
The following code will deadlock:
Parallel
.map(domains, in_threads: 4) do |domain|
Rails
.application
.executor
.wrap { EcommEnrichmentUtils.qualified_domain(domain) }
end
.compact
end
The contents of EcommEnrichmentUtils essentially sends out some HTTP requests.
Output for /rails/locks
Thread 0 [0x1a518 sleep] No lock (yielded share)
Waiting in start_exclusive to "load"
may be pre-empted for: "load"
blocked by: 1, 2
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:108:in `sleep'
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:108:in `wait'
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:108:in `wait_for_cond'
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:108:in `wait'
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:116:in `wait_while'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:220:in `wait_for'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:83:in `block (2 levels) in start_exclusive'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:82:in `block in start_exclusive'
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:202:in `synchronize'
/Users/amirsharif/.rvm/rubies/ruby-2.7.4/lib/ruby/2.7.0/monitor.rb:202:in `mon_synchronize'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:77:in `start_exclusive'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:149:in `exclusive'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:39:in `load_interlock'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:402:in `require_or_load'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:558:in `load_missing_constant'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:213:in `const_missing'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:90:in `block (2 levels) in validated_url_without_subdomain'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:89:in `each'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:89:in `detect'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:89:in `block in validated_url_without_subdomain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:102:in `block (2 levels) in get'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:189:in `calc'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:102:in `block in get'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:204:in `block in synchronized'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:199:in `synchronize'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:199:in `synchronized'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:102:in `get'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:68:in `validated_url_without_subdomain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `validate_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/_methods.rb:270:in `block in _on_method_added'
/Users/amirsharif/Projects/sendapostcardonline/app/typed_service_objects/ecomm_enrichment_utils.rb:22:in `qualified_domain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `validate_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/_methods.rb:270:in `block in _on_method_added'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:374:in `block (3 levels) in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/execution_wrapper.rb:88:in `wrap'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:374:in `block (2 levels) in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:507:in `call_with_index'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:367:in `block (2 levels) in work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:518:in `with_instrumentation'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:366:in `block in work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:215:in `block (4 levels) in in_threads'
---
Thread 1 [0x1a52c sleep] Sharing
blocking: 0
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:199:in `synchronize'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:199:in `synchronized'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:102:in `get'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:68:in `validated_url_without_subdomain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation_2_7.rb:703:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation_2_7.rb:703:in `block in create_validator_method_medium1'
/Users/amirsharif/Projects/sendapostcardonline/app/typed_service_objects/ecomm_enrichment_utils.rb:22:in `qualified_domain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `validate_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/_methods.rb:270:in `block in _on_method_added'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:374:in `block (3 levels) in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/execution_wrapper.rb:88:in `wrap'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:374:in `block (2 levels) in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:507:in `call_with_index'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:367:in `block (2 levels) in work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:518:in `with_instrumentation'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:366:in `block in work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:215:in `block (4 levels) in in_threads'
---
Thread 2 [0x1a540 sleep] Sharing
blocking: 0
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:199:in `synchronize'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:199:in `synchronized'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/zache-0.12.0/lib/zache.rb:102:in `get'
/Users/amirsharif/Projects/sendapostcardonline/app/services/domain_helper.rb:68:in `validated_url_without_subdomain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation_2_7.rb:703:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation_2_7.rb:703:in `block in create_validator_method_medium1'
/Users/amirsharif/Projects/sendapostcardonline/app/typed_service_objects/ecomm_enrichment_utils.rb:22:in `qualified_domain'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `validate_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/_methods.rb:270:in `block in _on_method_added'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:374:in `block (3 levels) in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/execution_wrapper.rb:88:in `wrap'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:374:in `block (2 levels) in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:507:in `call_with_index'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:367:in `block (2 levels) in work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:518:in `with_instrumentation'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:366:in `block in work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:215:in `block (4 levels) in in_threads'
---
Thread 3 [0x15f7c sleep] No lock (yielded share)
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:217:in `value'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:217:in `map'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:217:in `block (2 levels) in in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:213:in `handle_interrupt'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:213:in `block in in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:211:in `handle_interrupt'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:211:in `in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:360:in `work_in_threads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/parallel-1.20.1/lib/parallel.rb:281:in `map'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:370:in `block in normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:368:in `normalize_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `bind_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/call_validation.rb:161:in `validate_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/sorbet-runtime-0.5.9465/lib/types/private/methods/_methods.rb:270:in `block in _on_method_added'
/Users/amirsharif/Projects/sendapostcardonline/app/controllers/ecomm_analyze/collections_controller.rb:177:in `bulk_add_domains'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/abstract_controller/base.rb:228:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actiontext-6.1.4.1/lib/action_text/rendering.rb:20:in `with_renderer'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actiontext-6.1.4.1/lib/action_text/engine.rb:59:in `block (4 levels) in <class:Engine>'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `block in instrument'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `instrument'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activerecord-6.1.4.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/abstract_controller/base.rb:165:in `process'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionview-6.1.4.1/lib/action_view/rendering.rb:39:in `process'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal.rb:190:in `dispatch'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_controller/metal.rb:254:in `dispatch'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/journey/router.rb:32:in `each'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/journey/router.rb:32:in `serve'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/routing/route_set.rb:842:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/meta_request-0.7.3/lib/meta_request/middlewares/app_request_handler.rb:15:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/meta_request-0.7.3/lib/meta_request/middlewares/meta_request_handler.rb:15:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/flipper-0.22.1/lib/flipper/middleware/memoizer.rb:77:in `memoized_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/flipper-0.22.1/lib/flipper/middleware/memoizer.rb:42:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/cookies.rb:689:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:601:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rollbar-3.2.0/lib/rollbar/middleware/rails/rollbar.rb:25:in `block in call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rollbar-3.2.0/lib/rollbar.rb:145:in `scoped'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rollbar-3.2.0/lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rollbar-3.2.0/lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/web-console-4.1.0/lib/web_console/middleware.rb:132:in `call_app'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/web-console-4.1.0/lib/web_console/middleware.rb:28:in `block in call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/web-console-4.1.0/lib/web_console/middleware.rb:17:in `catch'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/web-console-4.1.0/lib/web_console/middleware.rb:17:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-contrib-2.3.0/lib/rack/contrib/response_headers.rb:19:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/meta_request-0.7.3/lib/meta_request/middlewares/headers.rb:18:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/railties-6.1.4.1/lib/rails/rack/logger.rb:37:in `call_app'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/railties-6.1.4.1/lib/rails/rack/logger.rb:26:in `block in call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:37:in `tagged'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/tagged_logging.rb:99:in `tagged'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/railties-6.1.4.1/lib/rails/rack/logger.rb:26:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/request_id.rb:26:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/activesupport-6.1.4.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-livereload-0.3.17/lib/rack/livereload.rb:23:in `_call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-livereload-0.3.17/lib/rack/livereload.rb:14:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/static.rb:24:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/static.rb:24:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/debug_locks.rb:41:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-mini-profiler-2.3.3/lib/mini_profiler/profiler.rb:393:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/webpacker-5.4.3/lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/rack-proxy-0.7.0/lib/rack/proxy.rb:63:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/railties-6.1.4.1/lib/rails/engine.rb:539:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/puma-5.5.2/lib/puma/configuration.rb:249:in `call'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/puma-5.5.2/lib/puma/request.rb:77:in `block in handle_request'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/puma-5.5.2/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/puma-5.5.2/lib/puma/request.rb:76:in `handle_request'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/puma-5.5.2/lib/puma/server.rb:447:in `process_client'
/Users/amirsharif/.rvm/gems/ruby-2.7.4/gems/puma-5.5.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
Unfortunately I don't know how to parse this or what a reasonable next step is.
Can anyone shed some light on this?
Okay, I figured it out.
It seems that this is an issue with the Zache gem.
See this line:
https://github.com/yegor256/zache/blob/master/lib/zache.rb#L206
This I believe introduces an external sleep.
I was able to fix my code by wrapping the method BEFORE called zache.get
Something like this:
ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
Rails
.application
.executor
.wrap do
zache.get(url, lifetime: 10.minutes) do
# do work here
end
end
end

Rails 6, #unbound_templates is nil in actionview/lib/action_view/template/resolver.rb

Upgrading from Rails 5.2.3 to 6.0.0 or 6.0.1, with Ruby 2.6.3, after bundling succeeds, the rails app:update command has been carefully run, and webpacker updated, a request to any page that requires no authentication gives:
Puma caught this error: undefined method `clear' for nil:NilClass (NoMethodError)
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:181:in `clear_cache'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:16:in `each'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:16:in `each'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/lookup_context.rb:79:in `block in clear'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/lookup_context.rb:78:in `each'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/lookup_context.rb:78:in `clear'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/cache_expiry.rb:40:in `clear_cache'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/cache_expiry.rb:30:in `block (2 levels) in clear_cache_if_necessary'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/file_update_checker.rb:83:in `execute'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/cache_expiry.rb:32:in `block in clear_cache_if_necessary'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/cache_expiry.rb:23:in `synchronize'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/cache_expiry.rb:23:in `clear_cache_if_necessary'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/cache_expiry.rb:11:in `before'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:429:in `block in make_lambda'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:201:in `block (2 levels) in halting'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:607:in `block (2 levels) in default_terminator'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:606:in `catch'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:606:in `block in default_terminator'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:202:in `block in halting'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:514:in `block in invoke_before'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:514:in `each'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:514:in `invoke_before'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:134:in `run_callbacks'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/execution_wrapper.rb:111:in `run!'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/execution_wrapper.rb:73:in `block in run!'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/execution_wrapper.rb:70:in `tap'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/execution_wrapper.rb:70:in `run!'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/executor.rb:12:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/static.rb:126:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/host_authorization.rb:83:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/webpacker-4.2.0/lib/webpacker/dev_server_proxy.rb:23:in `perform_request'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/engine.rb:526:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `public_send'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `method_missing'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/deflater.rb:34:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/configuration.rb:228:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/server.rb:667:in `handle_request'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/server.rb:470:in `process_client'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/server.rb:328:in `block in run'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
A second request to the same page gives:
Error during failsafe response: undefined method `compute_if_absent' for nil:NilClass
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:199:in `block in query'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:196:in `map'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:196:in `query'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:189:in `_find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:121:in `block in find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:156:in `block in cached'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:66:in `cache'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:155:in `cached'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/template/resolver.rb:120:in `find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:77:in `block (2 levels) in _find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:76:in `each'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:76:in `block in _find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:75:in `each'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:75:in `_find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:55:in `find_all'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/path_set.rb:48:in `find'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/lookup_context.rb:129:in `find'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/renderer/template_renderer.rb:47:in `determine_template'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/renderer/template_renderer.rb:9:in `render'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/renderer/renderer.rb:61:in `render_template_to_object'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/renderer/renderer.rb:29:in `render_to_object'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/rendering.rb:118:in `block in _render_template'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/base.rb:304:in `in_rendering_context'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/rendering.rb:117:in `_render_template'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/streaming.rb:219:in `_render_template'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/rendering.rb:103:in `render_to_body'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/renderers.rb:142:in `render_to_body'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/abstract_controller/rendering.rb:25:in `render'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/rendering.rb:36:in `render'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
/Users/Emma/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/core_ext/benchmark.rb:14:in `ms'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:44:in `block in render'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:85:in `cleanup_view_runtime'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.1/lib/active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:43:in `render'
/Users/Emma/rails/consonance/app/controllers/exceptions_controller.rb:20:in `block (2 levels) in show'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/mime_responds.rb:214:in `respond_to'
/Users/Emma/rails/consonance/app/controllers/exceptions_controller.rb:14:in `show'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/abstract_controller/base.rb:196:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/callbacks.rb:135:in `run_callbacks'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/notifications.rb:180:in `block in instrument'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/notifications.rb:180:in `instrument'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activerecord-6.0.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/abstract_controller/base.rb:136:in `process'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionview-6.0.1/lib/action_view/rendering.rb:39:in `process'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal.rb:191:in `dispatch'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_controller/metal.rb:236:in `block in action'
/Users/Emma/rails/consonance/config/application.rb:172:in `block in <class:Application>'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/show_exceptions.rb:51:in `render_exception'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/show_exceptions.rb:36:in `rescue in call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/rack/logger.rb:38:in `call_app'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/rack/logger.rb:26:in `block in call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/tagged_logging.rb:80:in `block in tagged'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/tagged_logging.rb:28:in `tagged'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/tagged_logging.rb:80:in `tagged'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/rack/logger.rb:26:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/request_store-1.4.1/lib/request_store/middleware.rb:19:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/skylight-core-4.0.2/lib/skylight/core/probes/action_dispatch/request_id.rb:12:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/activesupport-6.0.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/static.rb:126:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/actionpack-6.0.1/lib/action_dispatch/middleware/host_authorization.rb:83:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/webpacker-4.2.0/lib/webpacker/dev_server_proxy.rb:23:in `perform_request'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/engine.rb:526:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `public_send'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/railties-6.0.1/lib/rails/railtie.rb:190:in `method_missing'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/rack-2.0.7/lib/rack/deflater.rb:34:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/configuration.rb:228:in `call'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/server.rb:667:in `handle_request'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/server.rb:470:in `process_client'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/server.rb:328:in `block in run'
/Users/Emma/.rvm/gems/ruby-2.6.3/gems/puma-4.3.0/lib/puma/thread_pool.rb:134:in `block in spawn_thread'
This means that the #unbound_templates variable introduced here is nil. On a Rails console, Concurrent::Map.new works fine.
How can this instance variable, that gets set in the initializer, be nil?
I have the exact same error and I have had no progress debugging it thus far. My suspicion is that it is caused by a gem but I just don't know yet.
#snowangel if you want to compare Gemfiles I've posted mine here: https://gist.github.com/biscuitvile/7bf0d4423ce0b2aa79e0ccc08bff4295
NOTE: I got the same error on the second request
undefined method `compute_if_absent' for nil:NilClass
TLDR;
Configure database's prepared_statements only to true or false
EXPLANATION
In my case, I erroneously configured prepared_statements to nil.
In this line on ActiveRecord, it calls #find_by_statement_cache then calls compute_if_absent,
def cached_find_by_statement(key, &block)
cache = #find_by_statement_cache[connection.prepared_statements]
# THIS LINE BELOW
cache.compute_if_absent(key) { StatementCache.create(connection, &block) }
end
where it has the following value:
#find_by_statement_cache = { true => Concurrent::Map.new, false => Concurrent::Map.new }
And since I've configured it to nil, it renders an undefined method compute_if_absent error.

Error when exporting data to csv/xls file

I am attempting to export data to an excel document and have been following railscast 362 however I am getting errors. The main issue I seem to be having is that previously campaign didnt have a model file but rather an observer file. When I create a campaign model file an error occurs relating to ransack search features on the page however these errors do not occur when i remove the campaign model file again. Can anyone explain the difference and why I might be getting this error.
Controller: campaigns_controller.rb
def index
#search = Campaign.search(params[:q])
#campaigns = #search.result.page(params[:page]||1)
if params[:sort]
#my_campaigns = Campaign.active
#campaigns = #my_campaigns
#campaigns = #campaigns.order(sort_column + " " + sort_direction).page(params[:page]||1)
end
respond_to do |format|
format.html
format.csv { send_data #campaigns.to_csv }
format.xls
end
end
Model: campaign.rb
class Campaign < ActiveRecord::Base
def self.to_csv(options = {})
CSV.generate(options) do |csv|
csv << column_names
all.each do |product|
csv << product.attributes.values_at(*column_names)
end
end
end
end
View link
= link_to '<i class="glyphicon glyphicon-cloud-download"></i>'.html_safe, admin_campaigns_path(format: "csv"), title: "Download Campaign XLS", rel: 'tooltip'
= link_to '<i class="glyphicon glyphicon-cloud-download"></i>'.html_safe, admin_campaigns_path(format: "xls"), title: "Download Campaign XLS", rel: 'tooltip'
Full Trace
/home.rvm/gems/ruby-2.3.0/gems/ransack-1.1.0/lib/ransack/search.rb:89:in `method_missing'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:1159:in `value_before_type_cast'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:1147:in `value_before_type_cast'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:1041:in `block in to_input_field_tag'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:1041:in `fetch'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:1041:in `to_input_field_tag'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:690:in `text_field'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:1283:in `text_field'
app/views/admin/campaigns/index.html.haml:45:in `block in _app_views_admin_campaigns_index_html_haml___1611602558606621117_84091040'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers/action_view_mods.rb:133:in `block (2 levels) in form_for_with_haml'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers.rb:278:in `with_tabs'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers/action_view_mods.rb:133:in `block in form_for_with_haml'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers/action_view_xss_mods.rb:5:in `with_output_buffer_with_haml_xss'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/capture_helper.rb:40:in `capture'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers/action_view_mods.rb:59:in `capture_with_haml'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/helpers/form_helper.rb:378:in `form_for'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers/action_view_mods.rb:135:in `form_for_with_haml'
/home.rvm/gems/ruby-2.3.0/gems/haml-3.2.0.rc.4/lib/haml/helpers/action_view_xss_mods.rb:28:in `form_for_with_haml_xss'
/home.rvm/gems/ruby-2.3.0/gems/ransack-1.1.0/lib/ransack/helpers/form_helper.rb:24:in `search_form_for'
app/views/admin/campaigns/index.html.haml:42:in `_app_views_admin_campaigns_index_html_haml___1611602558606621117_84091040'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/template.rb:145:in `block in render'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications.rb:125:in `instrument'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/template.rb:143:in `render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/template_renderer.rb:48:in `block (2 levels) in render_template'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications.rb:123:in `block in instrument'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications.rb:123:in `instrument'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/template_renderer.rb:47:in `block in render_template'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/template_renderer.rb:55:in `render_with_layout'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/template_renderer.rb:46:in `render_template'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/template_renderer.rb:18:in `render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/renderer.rb:41:in `render_template'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_view/renderer/renderer.rb:22:in `render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/rendering.rb:88:in `render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/rendering.rb:16:in `render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home.rvm/gems/ruby-2.3.0/gems/activerecord-3.2.22.2/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
app/controllers/admin/campaigns_controller.rb:20:in `index'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/base.rb:167:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:459:in `block in _run__3061069654697754334__process_action__3738294813647729293__callbacks'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_8614'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:326:in `around'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:310:in `_callback_around_15'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_8614'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:414:in `_run__3061069654697754334__process_action__3738294813647729293__callbacks'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:405:in `__run_callback'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications.rb:123:in `block in instrument'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/notifications.rb:123:in `instrument'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/activerecord-3.2.22.2/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/base.rb:121:in `process'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/abstract_controller/rendering.rb:45:in `process'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal.rb:203:in `dispatch'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_controller/metal.rb:246:in `block in action'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/routing/route_set.rb:36:in `call'
/home.rvm/gems/ruby-2.3.0/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/home.rvm/gems/ruby-2.3.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/home.rvm/gems/ruby-2.3.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/routing/route_set.rb:608:in `call'
/home.rvm/gems/ruby-2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
/home.rvm/gems/ruby-2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
/home.rvm/gems/ruby-2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/etag.rb:23:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/conditionalget.rb:25:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/head.rb:14:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/flash.rb:242:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/home.rvm/gems/ruby-2.3.0/gems/activerecord-3.2.22.2/lib/active_record/query_cache.rb:64:in `call'
/home.rvm/gems/ruby-2.3.0/gems/activerecord-3.2.22.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:405:in `_run__2077840542981017711__call__2151128257704977288__callbacks'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:405:in `__run_callback'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/reloader.rb:65:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/home.rvm/gems/ruby-2.3.0/gems/better_errors-1.1.0/lib/better_errors/middleware.rb:58:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/rack/logger.rb:32:in `call_app'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/rack/logger.rb:16:in `block in call'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/tagged_logging.rb:22:in `tagged'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/rack/logger.rb:16:in `call'
config/initializers/quiet_assets.rb:7:in `call_with_quiet_assets'
/home.rvm/gems/ruby-2.3.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
/home.rvm/gems/ruby-2.3.0/gems/activesupport-3.2.22.2/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/lock.rb:15:in `call'
/home.rvm/gems/ruby-2.3.0/gems/actionpack-3.2.22.2/lib/action_dispatch/middleware/static.rb:83:in `call'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/engine.rb:484:in `call'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/application.rb:231:in `call'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/content_length.rb:14:in `call'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/rack/log_tailer.rb:17:in `call'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/connection.rb:86:in `block in pre_process'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/connection.rb:84:in `catch'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/connection.rb:84:in `pre_process'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/connection.rb:53:in `process'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/connection.rb:39:in `receive_data'
/home.rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run_machine'
/home.rvm/gems/ruby-2.3.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/backends/base.rb:73:in `start'
/home.rvm/gems/ruby-2.3.0/gems/thin-1.7.0/lib/thin/server.rb:162:in `start'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/handler/thin.rb:13:in `run'
/home.rvm/gems/ruby-2.3.0/gems/rack-1.4.7/lib/rack/server.rb:268:in `start'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/commands/server.rb:70:in `start'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/commands.rb:55:in `block in <top (required)>'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/commands.rb:50:in `tap'
/home.rvm/gems/ruby-2.3.0/gems/railties-3.2.22.2/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

ActionView::Template::Error: unknown encoding name - undecided

This is probably an easy fix, but my google fu has failed me.
Is there an easy way to find out from this which file has the encoding problem.
The application file has a meta tag for UTF-8
The application controller has a config.encoding ="utf-8"
I don't see any error in the browser. I'm seeing it from rake test.
1) Error:
StoreControllerTest#test_should_get_index:
ActionView::Template::Error: unknown encoding name - undecided
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:202:in `force_encoding'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:202:in `encode!'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:266:in `compile'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:244:in `block in compile!'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:232:in `synchronize'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:232:in `compile!'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:144:in `block in render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `block in instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/template.rb:143:in `render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/template_renderer.rb:48:in `block (2 levels) in render_template'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `block in instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/template_renderer.rb:47:in `block in render_template'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/template_renderer.rb:55:in `render_with_layout'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/template_renderer.rb:46:in `render_template'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/template_renderer.rb:19:in `render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_view/renderer/renderer.rb:17:in `render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:88:in `render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/rendering.rb:16:in `render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activerecord-3.2.14/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/base.rb:167:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:414:in `_run__996699002__process_action__630865188__callbacks'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `block in instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activerecord-3.2.14/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/base.rb:121:in `process'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/abstract_controller/rendering.rb:45:in `process'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:490:in `process'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:54:in `process'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/actionpack-3.2.14/lib/action_controller/test_case.rb:407:in `get'
/home/ubuntu/Documents/hartl/depot/test/functional/store_controller_test.rb:5:in `block in <class:StoreControllerTest>'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1265:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit/testcase.rb:17:in `run'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:458:in `_run__884541456__setup__650240084__callbacks'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/activesupport-3.2.14/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:940:in `block in _run_suite'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:663:in `block in _run_suites'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:661:in `each'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:661:in `_run_suites'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:27:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:780:in `run'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:372:in `block (2 levels) in autorun'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:33:in `run_once'
/home/ubuntu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:371:in `block in autorun'
Finished tests in 0.663328s, 12.0604 tests/s, 15.0755 assertions/s.
8 tests, 10 assertions, 0 failures, 1 errors, 0 skips
ruby -v: ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux]
Errors running test:functionals! #<RuntimeError: Command failed with status (1): [ruby -I"lib:test" -I"/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib" "/home/ubuntu/.rvm/gems/ruby-2.1.0/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/functional/**/*_test.rb" ]>

raise_in_transactional_callbacks issue with paperclip (rails 4.2)

I've updated to rails 4.2. When I follow up on deprecation warnings and set config.active_record.raise_in_transactional_callbacks = true in my environment, I start running into issues:
Failure/Error: Unable to find matching line from backtrace
NoMethodError:
undefined method `id' for nil:NilClass
The id refers to current_user.id, which has become unavailable (hence the warden and devise mentions in the error trace).
When removing config.active_record.raise_in_transactional_callbacks = true, deprecation warnings appear only with respect to two models that use paperclip, which leads me to believe that this might be an issue with paperclip callbacks. I could just ignore the deprecation warnings, but i'd rather fix the underlying issue. Any suggestions?
Here's an error trace:
commpleted 500 Internal Server Error in 152ms
Unexpected error while processing request: undefined method `env' for nil:NilClass
/Users/j/.rvm/gems/ruby-2.1.2/gems/devise-3.4.1/lib/devise/controllers/helpers.rb:135:in `warden'
/Users/j/.rvm/gems/ruby-2.1.2/gems/devise-3.4.1/lib/devise/controllers/helpers.rb:120:in `current_user'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/helpers.rb:67:in `current_user'
/Users/j/Google Drive/rails_projects/versneller/app/views/sync/messages/_message.html.erb:48:in `_app_views_sync_messages__message_html_erb___1152654597097292680_70140856995020'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/template.rb:145:in `block in render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/template.rb:333:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/template.rb:143:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:339:in `render_partial'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:310:in `block in render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/partial_renderer.rb:309:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/renderer/renderer.rb:21:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/helpers/rendering_helper.rb:32:in `render'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/renderer.rb:16:in `render_to_string'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/partial.rb:29:in `render_to_string'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/partial_creator.rb:30:in `message'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:87:in `block (2 levels) in sync_new'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:86:in `collect'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:86:in `block in sync_new'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:80:in `collect'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/actions.rb:80:in `sync_new'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/action.rb:17:in `perform'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/model_actions.rb:48:in `each'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/model_actions.rb:48:in `publish_sync_actions'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:250:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:250:in `block in conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:245:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:245:in `block in conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_commit_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:314:in `committed!'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:93:in `commit_records'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:157:in `commit'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in `with_transaction_returning_status'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:286:in `block in save'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/transactions.rb:285:in `save'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/persistence.rb:34:in `create'
/Users/j/Google Drive/rails_projects/versneller/app/controllers/instances_controller.rb:74:in `advice'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:198:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:117:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:288:in `block (2 levels) in halting_and_conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/controller_helpers.rb:22:in `block in enable_sync'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/model.rb:24:in `enable'
/Users/j/.rvm/gems/ruby-2.1.2/gems/sync-0.3.5/lib/sync/controller_helpers.rb:21:in `enable_sync'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in `block in make_lambda'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:287:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:287:in `block in halting_and_conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal.rb:195:in `dispatch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_controller/metal.rb:236:in `block in action'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:42:in `serve'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `each'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/journey/router.rb:30:in `serve'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:802:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/bullet-4.14.4/lib/bullet/rack.rb:10:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/etag.rb:24:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/conditionalget.rb:25:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/head.rb:13:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/flash.rb:260:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:225:in `context'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:220:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/query_cache.rb:36:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:88:in `_run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/reloader.rb:73:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/rack/logger.rb:38:in `call_app'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `block in call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:26:in `tagged'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/tagged_logging.rb:68:in `tagged'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/rack/logger.rb:20:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/methodoverride.rb:22:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/lock.rb:17:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/actionpack-4.2.0/lib/action_dispatch/middleware/static.rb:113:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/sendfile.rb:113:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/engine.rb:518:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/application.rb:164:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/content_length.rb:15:in `call'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data'
/Users/j/.rvm/gems/ruby-2.1.2/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/Users/j/.rvm/gems/ruby-2.1.2/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/thin-1.6.3/lib/thin/server.rb:162:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/handler/thin.rb:19:in `run'
/Users/j/.rvm/gems/ruby-2.1.2/gems/rack-1.6.0/lib/rack/server.rb:286:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/Users/j/.rvm/gems/ruby-2.1.2/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
bin/railre'
Here is the issue related to what you say : https://github.com/thoughtbot/paperclip/issues/1933 (especially my comments : https://github.com/thoughtbot/paperclip/issues/1933#issuecomment-169607838 and https://github.com/thoughtbot/paperclip/issues/1933#issuecomment-170509222 )
Please note that this warning is not an error, it only tells you the futur behaviour of ActiveRecord, which is not to shallow error.
Removing config.active_record.raise_in_transactional_callbacks = true will show you the warning of after_commit / after_rollback and switch to the old behaviour, which is shallowing errors.

Resources