diff --git a/lib/tasks/rswag.rake b/lib/tasks/rswag.rake index 73133b911..258641f8f 100644 --- a/lib/tasks/rswag.rake +++ b/lib/tasks/rswag.rake @@ -1,3 +1,9 @@ # frozen_string_literal: true -require "rswag/specs" +begin + require "rswag/specs" +rescue LoadError + # rswag is not available in this environment (likely production where + # rswag is in the test/development group). Skip loading rswag rake + # tasks so `rake -P` can run during asset precompilation / deploy. +end