Merge branch 'master' into 14946-ruby-2.5
[arvados.git] / apps / workbench / config / load_config.rb
index 441a437e21c4a566b6f8d95d92ef8a80ab1c11b6..5f0d9caf96450ebceb9f9beb90324805e410a9b8 100644 (file)
@@ -9,7 +9,7 @@ $application_config = {}
 
 %w(application.default application).each do |cfgfile|
   path = "#{::Rails.root.to_s}/config/#{cfgfile}.yml"
-  if File.exists? path
+  if File.exist? path
     yaml = ERB.new(IO.read path).result(binding)
     confs = YAML.load(yaml, deserialize_symbols: true)
     $application_config.merge!(confs['common'] || {})
@@ -46,8 +46,9 @@ EOS
       cfg.send "#{k}=", v
     end
   end
-  if !nils.empty?
+  if !nils.empty? and not ::Rails.groups.include?('assets')
     raise <<EOS
+#{::Rails.groups.include?('assets')}
 Refusing to start in #{::Rails.env.to_s} mode with missing configuration.
 
 The following configuration settings must be specified in
@@ -57,7 +58,7 @@ config/application.yml:
 EOS
   end
   # Refuse to start if keep-web isn't configured
-  if not (config.keep_web_url or config.keep_web_download_url)
+  if not (config.keep_web_url or config.keep_web_download_url) and not ::Rails.groups.include?('assets')
     raise <<EOS
 Refusing to start in #{::Rails.env.to_s} mode with missing configuration.