From fad500b8c62b053bcd1f8faf2a13f28d3def573f Mon Sep 17 00:00:00 2001 From: Greg Molnar Date: Tue, 3 Jan 2023 11:42:16 -0100 Subject: [PATCH] fix comparison type issue in puma.rb template (#46874) * fix comparison type issue in puma.rb template * Ensure integer Co-authored-by: David Heinemeier Hansson --- .../lib/rails/generators/rails/app/templates/config/puma.rb.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt index be653c9c4c..ec35fc10b3 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt @@ -13,7 +13,7 @@ threads min_threads_count, max_threads_count # Specifies that the worker count should equal the number of processors in production. if ENV["RAILS_ENV"] == "production" - worker_count = ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count } + worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) workers worker_count if worker_count > 1 end