From b86aa06bbbd3e4c60374b3bcd80afeccbc56aa1a Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Thu, 5 Jun 2025 00:55:45 +0200 Subject: [PATCH] Fix rails env call --- config/puma.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/puma.rb b/config/puma.rb index 9157f6ba..d0e2b212 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -44,7 +44,13 @@ preload_app! plugin :tmp_restart # If env var is set or we're in development, solid_queue will run in puma -plugin :solid_queue if ENV['SOLID_QUEUE_IN_PUMA'] || Rails.env.development? +if ENV['SOLID_QUEUE_IN_PUMA'] || ENV.fetch('RAILS_ENV', 'development') == 'development' + begin + plugin :solid_queue + rescue => e + puts "Failed to load solid_queue plugin: #{e.message}" + end +end # Prometheus exporter if ENV['PROMETHEUS_EXPORTER_ENABLED'].to_s == 'true'