From 4e6e31738181d65a7735606eafb26192f1e7e4b8 Mon Sep 17 00:00:00 2001 From: "Darren L. Weber, Ph.D" Date: Fri, 30 Sep 2016 15:10:19 -0700 Subject: [PATCH] Rakefile - suppress failure to load app_version_tasks in production --- Rakefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index a657da62..ae4ea735 100644 --- a/Rakefile +++ b/Rakefile @@ -6,8 +6,11 @@ require File.expand_path('../config/application', __FILE__) Rails.application.load_tasks -# From https://github.com/sul-dlss/app_version_tasks -# A default configuration works for this application. -spec = Gem::Specification.find_by_name 'app_version_tasks' -load "#{spec.gem_dir}/lib/tasks/app_version_tasks.rake" -require 'app_version_tasks' +begin + # From https://github.com/sul-dlss/app_version_tasks + # A default configuration works for this application. + spec = Gem::Specification.find_by_name 'app_version_tasks' + load "#{spec.gem_dir}/lib/tasks/app_version_tasks.rake" + require 'app_version_tasks' +rescue Gem::LoadError +end