diff --git a/config/initializers/_load_services.rb b/config/initializers/_load_services.rb index ef41d75a7..e893ce9ae 100644 --- a/config/initializers/_load_services.rb +++ b/config/initializers/_load_services.rb @@ -8,9 +8,12 @@ end oauth_keys_file = "#{Rails.root}/config/oauth_keys.yml" -if File.exist? oauth_keys_file - SERVICES = load_config_yaml(oauth_keys_file) -end - -SERVICES ||= load_config_yaml("#{oauth_keys_file}.example") +SERVICES = nil +silence_warnings do + if File.exist? oauth_keys_file + SERVICES = load_config_yaml(oauth_keys_file) + else + SERVICES = load_config_yaml("#{oauth_keys_file}.example") + end +end \ No newline at end of file