From e76a9db1e9f08eedd4df18c851ad559661195f50 Mon Sep 17 00:00:00 2001 From: Davide D'Agostino Date: Mon, 11 Apr 2011 14:17:22 +0200 Subject: [PATCH] Fixes. --- app/controllers/guides.rb | 1 - config/boot.rb | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/guides.rb b/app/controllers/guides.rb index 532c555..a3c7092 100644 --- a/app/controllers/guides.rb +++ b/app/controllers/guides.rb @@ -23,7 +23,6 @@ get :book, :provides => :pdf do content_type :pdf @guides = Guide.all(:order => "position") - PDFKit.configuration.wkhtmltopdf = "aaaaaaaaaa" html = render 'guides/book', :layout => false html.gsub!(/href="/, "href=\"http://www.padrinorb.com") kit = PDFKit.new(html, "footer-right" => "Page [page] of [toPage]", diff --git a/config/boot.rb b/config/boot.rb index 8e9bb40..72598f7 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -30,4 +30,8 @@ require 'padrino-contrib/helpers/assets_compressor' require 'open-uri' +# Fix for my Passenger Environment +PDFKit.configuration.wkhtmltopdf = "/usr/local/bin/wkhtmltopdf" + +# Boot Padrino Padrino.load! \ No newline at end of file