diff --git a/lib/active_storage/previewer/libreoffice_previewer.rb b/lib/active_storage/previewer/libreoffice_previewer.rb index 87eb6ecf8..4a291f7a1 100644 --- a/lib/active_storage/previewer/libreoffice_previewer.rb +++ b/lib/active_storage/previewer/libreoffice_previewer.rb @@ -21,7 +21,7 @@ module ActiveStorage begin success = system( - "#{libreoffice_path} --headless --invisible --convert-to png --outdir #{work_dir} #{input.path}" + libreoffice_path, '--headless', '--invisible', '--convert-to', 'png', '--outdir', work_dir, input.path ) unless success && File.file?(preview_file)