1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Rescue require exception

This commit is contained in:
David Heinemeier Hansson 2017-07-04 17:29:30 +02:00
parent bbfc73ae5a
commit 9b9d69b34e

View file

@ -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