From 38c05a4f07f029dbf4ba0ae189d2318db151046d Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Tue, 19 May 2020 14:27:12 +0100 Subject: [PATCH] FIX: Check backtrace and backtrace_locations before trying to print an error ... during plugin initialization. --- lib/plugin_initialization_guard.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugin_initialization_guard.rb b/lib/plugin_initialization_guard.rb index 11fd9430905..42c1bda864f 100644 --- a/lib/plugin_initialization_guard.rb +++ b/lib/plugin_initialization_guard.rb @@ -6,7 +6,7 @@ def plugin_initialization_guard(&block) rescue => error plugins_directory = Rails.root + 'plugins' - if error.backtrace + if error.backtrace && error.backtrace_locations plugin_path = error.backtrace_locations.lazy.map do |location| Pathname.new(location.absolute_path) .ascend