puma发现了以下错误:未定义的方法“first”nil:nilclass (nomethoderror)使用ElasticSearch服务。
当记录更新时,则此问题
ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload/association.rb:105:in block in records_for' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/core.rb:361:in
init_with_attributes'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/persistence.rb:403:in instantiate_instance_of' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/querying.rb:61:in
在find_by_sql'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/result.rb:62:in block in each' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/result.rb:62:in
每个'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/result.rb:62:in each' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/querying.rb:61:in
map'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/querying.rb:61:in block in find_by_sql' ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in
instrument'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/querying.rb:56:in find_by_sql' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:821:in
exec_querys的ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:839:in skip_query_cache_if_necessary' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:808:in
exec_querys的ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:626:in load' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader/association.rb:102:in
ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active-record/associations/preload/association的记录。rb:41:in preloaded_records' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader/association.rb:32:in
记录由所有者的ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active-record/associations/preload/association.rb:18:in block in run' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader/association.rb:17:in
每个'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload/association.rb:17:in run' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:145:in
预加载程序中的块用于反射'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload.rb:144:in each' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:144:in
map'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload.rb:144:in preloaders_for_reflection' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:113:in
预加载程序中的块(2个级别),用于\u hash'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload.rb:112:in each' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:112:in
flat_-map'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_-record/associations/preload.rb:112:in block in preloaders_for_hash' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:111:in
每个'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload.rb:111:in flat_map' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:111:in
预加载程序\u用于\u hash'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preloader.rb:102:in preloaders_on' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:92:in
预加载'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload.rb:91:in each' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/associations/preloader.rb:91:in
平面Map'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/associations/preload.rb:91:in preload' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:745:in
preload\u associations的ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/relation中的块。rb:743:in each' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:743:in
预加载\u协会的ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active \u record/relation.rb:824:in block in exec_queries' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:839:in
如有必要,跳过\u query \u cache \u'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active \u record/relation.rb:808:in exec_queries' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:626:in
加载'ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active\u record/relation.rb:250:in records' ruby-2.7.2/rails-6.0.3.4/gems/activerecord-6.0.3.4/lib/active_record/relation/delegation.rb:87:in
每个'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:129:in block in import_objects' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:119:in
每个'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:119:in each_slice' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:119:in
每个'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:119:in map' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:119:in
导入\u objects的ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/adapter/orm.rb:81:in import' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/import.rb:142:in
import\u linear'ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active\u support/notifications中的块。rb:180:in block in instrument' ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active_support/notifications/instrumenter.rb:24:in
instrument'ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active\u-support/notifications.rb:180:in instrument' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/import.rb:141:in
import_linear'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/import.rb:136:in import_routine' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/type/import.rb:87:in
导入!'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy/atomic.rb:25:in block in leave' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy/atomic.rb:25:in
每个'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy/atomic.rb:25:in all?' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy/atomic.rb:25:in
离开ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy.rb:63:in tap' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy.rb:63:in
pop'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/strategy.rb:72:in wrap' ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy.rb:201:in
strategy'ruby-2.7.2/rails-6.0.3.4/bundler/gems/chewy-c91c6842b3e4/lib/chewy/railtie.rb:19:in call' ruby-2.7.2/rails-6.0.3.4/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:37:in
调用应用程序“ruby-2.7.2/rails-6.0.3.4/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:26:in block in call' ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active_support/tagged_logging.rb:80:in
块在标记的“ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active\u-support/tagged\u-logging.rb:28:in tagged' ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active_support/tagged_logging.rb:80:in
标记为“ruby-2.7.2/rails-6.0.3.4/gems/railties-6.0.3.4/lib/rails/rack/logger.rb:26:in call' ruby-2.7.2/rails-6.0.3.4/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13:in
调用'ruby-2.7.2/rails-6.0.3.4/gems/actionpack-6.0.3.4/lib/action\u dispatch/middleware/remote\u ip.rb:81:in call' ruby-2.7.2/rails-6.0.3.4/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/request_id.rb:27:in
调用'ruby-2.7.2/rails-6.0.3.4/gems/rack-2.2.3/lib/rack/method\u override.rb:24:in call' ruby-2.7.2/rails-6.0.3.4/gems/rack-2.2.3/lib/rack/runtime.rb:22:in
调用'ruby-2.7.2/rails-6.0.3.4/gems/activesupport-6.0.3.4/lib/active\u-support/cache/strategy/local\u-cache\u-middleware.rb:29:in call' ruby-2.7.2/rails-6.0.3.4/gems/actionpack-6.0.3.4/lib/action_dispatch/middleware/executor.rb:14:in
调用'ruby-2.7.2/rails-6.0.3.4/gems/actionpack-6.0.3.4/lib/action\u dispatch/middleware/static.rb:126:in call' ruby-2.7.2/rails-6.0.3.4/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in
调用'ruby-2.7.2/rails-6.0.3.4/gems/actionpack-6.0.3.4/lib/action\u dispatch/middleware/host\u authorization.rb:82:in call' ruby-2.7.2/rails-6.0.3.4/gems/webpacker-5.2.1/lib/webpacker/dev_server_proxy.rb:25:in
执行请求'ruby-2.7.2/rails-6.0.3.4/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in call' ruby-2.7.2/rails-6.0.3.4/gems/railties-6.0.3.4/lib/rails/engine.rb:527:in
调用'ruby-2.7.2/rails-6.0.3.4/gems/puma-5.1.0/lib/puma/configuration.rb:246:in call' ruby-2.7.2/rails-6.0.3.4/gems/puma-5.1.0/lib/puma/request.rb:76:in
句柄中的块请求'ruby-2.7.2/rails-6.0.3.4/gems/puma-5.1.0/lib/puma/thread\u pool.rb:337:in with_force_shutdown' ruby-2.7.2/rails-6.0.3.4/gems/puma-5.1.0/lib/puma/request.rb:75:in
处理请求'ruby-2.7.2/rails-6.0.3.4/gems/puma-5.1.0/lib/puma/server.rb:431:in process_client' ruby-2.7.2/rails-6.0.3.4/gems/puma-5.1.0/lib/puma/thread_pool.rb:145:in
'生成线程中的块'
暂无答案!
目前还没有任何答案,快来回答吧!