From 04f15a80262df980589927b5cd2543f4d529c941 Mon Sep 17 00:00:00 2001 From: D058266 Date: Tue, 5 Nov 2024 16:03:03 +0100 Subject: [PATCH] add mkdir -p for assets --- config/initializers/sprockets_processor.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/initializers/sprockets_processor.rb b/config/initializers/sprockets_processor.rb index f95124d3f8..96dd23cbfb 100644 --- a/config/initializers/sprockets_processor.rb +++ b/config/initializers/sprockets_processor.rb @@ -8,6 +8,9 @@ def self.call(input) if filename.end_with?('_widget.js') # without the digest in the file name path = File.join(Rails.public_path, 'assets', File.basename(filename)) + # Ensure the path directory exists + FileUtils.mkdir_p(path) + # Copy the file FileUtils.cp(filename, path) end nil