From 8851f133793517df9dcca0956c901a1fe02e9ee7 Mon Sep 17 00:00:00 2001 From: Tyranja Date: Wed, 24 Jul 2024 17:05:53 +0200 Subject: [PATCH] fix puma config --- config/puma.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/puma.rb b/config/puma.rb index 325436648..0aa72dba9 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -7,3 +7,9 @@ rackup DefaultRackup if defined?(DefaultRackup) port ENV['PORT'] || 3000 environment ENV['RACK_ENV'] || 'development' + +on_worker_boot do + # Worker-specific setup for Rails 4.1 to 5.2, after 5.2 it's not needed + # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot + ActiveRecord::Base.establish_connection +end