From 918dbe3916f0e853da3ef99598eb3b6a0201a16e Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Thu, 1 Oct 2026 11:01:22 -0400 Subject: [PATCH] Add `BUNDLE_GEMFILE` for non-rails workers Non-rails workers share the gemset but don't actually need to load all of the gems defined there. By providing a `BUNDLE_GEMFILE` env var this allows the non-rails worker to `require 'bundler/setup'` and ensure that we are using the proper versions of the gems. --- app/models/miq_worker/runner.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/miq_worker/runner.rb b/app/models/miq_worker/runner.rb index af84dcbe4b8..b6ce85a5de9 100644 --- a/app/models/miq_worker/runner.rb +++ b/app/models/miq_worker/runner.rb @@ -504,6 +504,7 @@ def worker_options def worker_env { "APP_ROOT" => Rails.root.to_s, + "BUNDLE_GEMFILE" => Rails.root.join("Gemfile").to_s, "GUID" => @worker.guid, "WORKER_HEARTBEAT_FILE" => @worker.heartbeat_file }