From bd80868620dc95ae280e00b9e7d21b2c255e9462 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Thu, 11 Jun 2026 10:07:12 +0900 Subject: [PATCH] Replace yajl-ruby with the json gem for JSON handling Since the yajl-ruby gem depends on a deprecated Ruby C API, it cannot be installed with Ruby 4.1. Signed-off-by: Shizuo Fujita --- lib/fluent/plugin/out_sql.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/plugin/out_sql.rb b/lib/fluent/plugin/out_sql.rb index c039166..d86e245 100644 --- a/lib/fluent/plugin/out_sql.rb +++ b/lib/fluent/plugin/out_sql.rb @@ -99,7 +99,7 @@ def import(chunk, output) columns |= new_record.keys records << @model.new(new_record) rescue => e - args = {error: e, table: @table, record: Yajl.dump(data)} + args = {error: e, table: @table, record: JSON.generate(data)} @log.warn "Failed to create the model. Ignore a record:", args end }