mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
config: Allow Operating System portability
try to use system version of wkhtmltopddf if installed before trying to use the linux build in project bin, which may crash
This commit is contained in:
parent
53feab6a8c
commit
647d68b053
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
PDFKit.configure do |config|
|
||||
config.wkhtmltopdf = "#{Rails.root}/vendor/bin/wkhtmltopdf"
|
||||
installed = %x(which wkhtmltopdf).chomp
|
||||
if installed == "" then
|
||||
installed = "#{Rails.root}/vendor/bin/wkhtmltopdf"
|
||||
end
|
||||
config.wkhtmltopdf = installed
|
||||
config.default_options = {
|
||||
page_size: 'A4',
|
||||
quiet: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue