Workbench shouldn't error out when config files are missing if
authorWard Vandewege <wvandewege@veritasgenetics.com>
Wed, 16 Aug 2017 17:07:32 +0000 (13:07 -0400)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Wed, 16 Aug 2017 17:07:32 +0000 (13:07 -0400)
RAILS_GROUP is set and includes 'assets'.

refs #12122

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

apps/workbench/config/load_config.rb

index 441a437e21c4a566b6f8d95d92ef8a80ab1c11b6..d8d4dff567a45e63e27e744ab8b0f9a0da36c82b 100644 (file)
@@ -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.