First of all i know this type of posts are already been made but i've tried almost all of them and i'm not been able to get the results so here i'm again posting the same kind of question.
Second of all i'm not having an asset pipeline issue here, so please forget about that.
Now let me explain what i'm doing. I'm using rails 3.1 and ruby 1.9.2, i installed wicked_pdf as a gem and installed wkhtmltopdf as mentioned in the wiki by purging the already installed wkhtml and downloading and extracting the new one to /usr/bin/wkhtmltopdf
I have an initializer that contains the following:
wicked_pdf.rb
WickedPdf.config = { :exe_path => '/usr/bin/wkhtmltopdf'}
In my view i have a link_to method as follows:
_filters.html.haml
= link_to 'show pdf', jobs_report_jobs_path(:format => :pdf), :method=>"post"
note if i remove the :format => :pdf option it works fine
in my controller i'm doing the following:
report_jobs_controller.rb
respond_to do |format|
format.html
format.js
format.pdf{
render :pdf=>"jobs",
:template => 'jobs.html.erb',
:layout=>"jobs.html"
}
end
note that i have tried from format.pdf alone without any options. I tried "jobs.pdf.erb", with and without layout option, all sorts of other options i don't even remember. All i get is a 406 not acceptable in the end.
Please guide me coz i need to implement this feature asap.
Regards,