From 9b9d69b34ea77ee62bd0ef1846767db9f795c301 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 4 Jul 2017 17:29:30 +0200 Subject: [PATCH] Rescue require exception --- lib/active_file/site.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/active_file/site.rb b/lib/active_file/site.rb index 260b84ab88..fc098e694f 100644 --- a/lib/active_file/site.rb +++ b/lib/active_file/site.rb @@ -4,6 +4,8 @@ class ActiveFile::Site begin require "active_file/site/#{site.to_s.downcase}_site" ActiveFile::Site.const_get(:"#{site}Site").new(**options) + rescue LoadError + puts "Couldn't configure unknow site: #{site}" end end