Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika@curoverse.com>
[arvados.git] / services / api / config / environment.rb
index 9ef3a4a496e10b518ae96cd21a67e7adb5235134..d4b606dafcc7f6e7112b4591e16e82a6bbd08a2e 100644 (file)
@@ -1,7 +1,16 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 # Load the rails application
 require File.expand_path('../application', __FILE__)
 require 'josh_id'
 
 # Initialize the rails application
 Server::Application.initialize!
-Rails.cache.clear
+begin
+  Rails.cache.clear
+rescue Errno::ENOENT => e
+  # Cache directory does not exist? Then cache is clear, proceed.
+  Rails.logger.warn "In Rails.cache.clear, ignoring #{e.inspect}"
+end