mileszs/wicked_pdf · error · RuntimeError
Failed to execute: #{command} Error: #{e}
Error message
Failed to execute:
#{command}
Error: #{e} What it means
Error "Failed to execute: #{command} Error: #{e}" thrown in mileszs/wicked_pdf.
Source
Thrown at lib/wicked_pdf.rb:103
if track_progress?(options)
invoke_with_progress(command, options)
else
_out, err, status = Open3.capture3(*command)
err = [status.to_s, err].join("\n") if !err.empty? || !status.success?
end
if options[:return_file]
return_file = options.delete(:return_file)
return generated_pdf_file
end
pdf = generated_pdf_file.read_in_chunks
raise "Error generating PDF\n Command Error: #{err}" if options[:raise_on_all_errors] && !err.empty?
raise "PDF could not be generated!\n Command Error: #{err}" if pdf && pdf.rstrip.empty?
pdf
rescue StandardError => e
raise "Failed to execute:\n#{command}\nError: #{e}"
ensure
clean_temp_files
generated_pdf_file.close! if generated_pdf_file && !return_file
end
private
def in_development_mode?
return Rails.env == 'development' if defined?(Rails.env)
RAILS_ENV == 'development' if defined?(RAILS_ENV)
end
def on_windows?
RbConfig::CONFIG['target_os'] =~ /mswin|mingw/
end
def print_command(cmd)View on GitHub (pinned to bce498de54)
When it happens
Trigger: Thrown at lib/wicked_pdf.rb:103 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of mileszs/wicked_pdf@bce498de54 (2026-08-23).
Data as JSON: /api/errors/304645475de77135.
Report an issue: GitHub.