From 6c0076665a7c4a9eb4038a7fbd744261f8ed3e53 Mon Sep 17 00:00:00 2001 From: Sojan Date: Thu, 9 Jan 2020 14:36:20 +0530 Subject: [PATCH] Bugfix: Production autoload issue for bot.rb - add app/bot to auto load path --- config/application.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/application.rb b/config/application.rb index c13d1db41..e336393d7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -16,6 +16,10 @@ module Chatwoot config.autoload_paths << Rails.root.join('lib') config.eager_load_paths << Rails.root.join('lib') + # This is required in production for zeitwerk to autoload the file + config.paths.add File.join('app', 'bot'), glob: File.join('**', '*.rb') + config.autoload_paths << Rails.root.join('app/bot') + # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers # -- all .rb files in that directory are automatically loaded after loading