Class: WordToPdf::InstallCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/word_to_pdf/install_check.rb

Class Method Summary collapse

Class Method Details

.ensure_office_installed!Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/word_to_pdf/install_check.rb', line 4

def self.ensure_office_installed!
  return if system('which soffice > /dev/null')

  abort <<~MSG
    ❌ LibreOffice is not installed or 'soffice' is not in PATH.
    ➤ Please install it manually:
      • On Ubuntu/Debian: sudo apt install libreoffice
      • On macOS (with Homebrew): brew install --cask libreoffice
      • On Windows: Download from https://www.libreoffice.org/download/

    Then run this gem again.
  MSG
end