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:
parent
bbfc73ae5a
commit
9b9d69b34e
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue