mileszs/wicked_pdf · error · RuntimeError
Error generating PDF Command Error: #{err}
Error message
Error generating PDF
Command Error: #{err} What it means
Error "Error generating PDF Command Error: #{err}" thrown in mileszs/wicked_pdf.
Source
Thrown at lib/wicked_pdf.rb:98
command << url
command << generated_pdf_file.path.to_s
print_command(command.inspect) if in_development_mode?
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
View on GitHub (pinned to bce498de54)
When it happens
Trigger: Thrown at lib/wicked_pdf.rb:98 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/694c2df37a95f311.
Report an issue: GitHub.