Forums » Fedena installation and troubleshooting » Wickedpdf bad path for local installation
Need suggestion for wickedpdf path
Following error is shown while clicking of pdf report
RuntimeError in EmployeeController#profile_pdf

Bad wkhtmltopdf's path
RAILS_ROOT: C:/fedena

Application Trace | Framework Trace | Full Trace
C:/fedena/vendor/plugins/wicked_pdf/lib/wicked_pdf.rb:27:in `initialize'
C:/fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `new'
C:/fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `make_pdf'
C:/fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:65:in `make_and_send_pdf'
C:/fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:17:in `render'
C:/fedena/app/controllers/employee_controller.rb:661:in `profile_pdf'
Request

Parameters:

{"id"=>"4"}
Show session dump

Response

Headers:

{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
Are you using Windows Instaler version or Bundle version ?
You need to download wkhtmltopdf and update the exe_path in config/initializers/wicked_pdf.rb
See http://www.projectfedena.org/install page for details.
I am using bundle version. I've also download the wickedpdf and update the wicked_pdf.rb but still I am getting problem. on online version it worked nice. But now I am trying to install it on my PC. All work is done perfectly but just PDF reporting. Please let me know how I change the path:
Rails root is: c:/fedena
wickedpdf file is stored in fedena directory.

:wkhtmltopdf => 'home/user/wkhtmltopdf-i386',


#:exe_path => 'usr/bin/wkhtmltopdf'
Let me know the modified path
In fedena bundle install windows version, you will find the PDF binary in /pdfbin or /pdf
In config/initializers/wicked_pdf.rb, point the :exe_path=>"#{RAILS_ROOT}/pdfbin/wkhtmltopdf.exe"
thanks working nicely. one more problem is: when pdf is generated the employee picture is not displaying?
Hell there, I have done all that is required of me and i have also changed the exe_path but im still getting an error like the one dhudy786 was getting.

Does the code line below remain the same irrespective of the system its been hosted on,
:wkhtmltopdf => '/home/user/wkhtmltopdf-i386',

This my error

Bad wkhtmltopdf's path

RAILS_ROOT: C:/Sites/Fedena
Application Trace | Framework Trace | Full Trace
C:/Sites/Fedena/vendor/plugins/wicked_pdf/lib/wicked_pdf.rb:27:in `initialize'
C:/Sites/Fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `new'
C:/Sites/Fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:53:in `make_pdf'
C:/Sites/Fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:65:in `make_and_send_pdf'
C:/Sites/Fedena/vendor/plugins/wicked_pdf/lib/pdf_helper.rb:17:in `render'
C:/Sites/Fedena/app/controllers/employee_controller.rb:657:in `profile_pdf'

Request

Parameters:

{"id"=>"2"}

Show session dump
Response

Headers:

{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}

Will be expecting a reply soon, thanks
let us know how you have given wicked pdf path in wicked_pdf.rb
WickedPdf.config = {
:wkhtmltopdf => '/home/user/wkhtmltopdf-i386',
:layout => "pdf.html",
:margin => { :top=> 40,
:bottom => 20,
:left=> 30,
:right => 30},
:header => {:html => { :template=> 'layouts/pdf_header.html'}},
:footer => {:html => { :template=> 'layouts/pdf_footer.html'}}
#:exe_path => "#{RAILS_ROOT}/pdf/wkhtmltopdf.exe"
}

This is it
This is the path set in default fedena and it will be different in your system. Hope you are working in windows machine. Find the path of wickedpdf in your machine and paste that path exactly in wicked_pdf.rb
My fedena installation is located in C:/Sites/Fedena so based on dis, what's the rite path
Its the path of wicked_pdf file. install wicked_pdf if you have not installed it.
I have it installed in C:\Sites\Fedena\pdf
I have it installed in C:\Sites\Fedena\pdf
ok then find the file wkhtmltopdf.exe end put the path of that file in wicked_pdf.rb
This is what i have


WickedPdf.config = {
:wkhtmltopdf => 'C:/Sites/Fedena/pdf/wkhtmltopdf-i386',
:layout => "pdf.html",
:margin => { :top=> 40,
:bottom => 20,
:left=> 30,
:right => 30},
:header => {:html => { :template=> 'layouts/pdf_header.html'}},
:footer => {:html => { :template=> 'layouts/pdf_footer.html'}}
#:exe_path => "C:/Sites/Fedena/pdf/wkhtmltopdf.exe"
}

It still wont work
remove # in the last line and try again..

Supasofi, try :

:wkhtmltopdf => "C:/Sites/Fedena/pdf/wkhtmltopdf.exe"

and let us know...
hai,

Did you install the windows installer of wkhtmltopdf ? I suppose that you are using linux version of wkhtmltopdf
Dancing Dancing, hey thanks jwalkerbl it worked, thanks alot.
@i_7@aol.in : it stopped my server from restarting.
@Sanjay: thanks
Thanks for the help guys, mmuaah