Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
I'm having this issue, too.
Weird thing is, the logs don't show a backtrace, only:
Also, it happens after the request:
Furthermore the error isn't sent to Airbrake (prev. Hoptoad).
When I remove the
I suspect it's an issue with the middleware. Could it be an issue with other middleware I'm using? With Passenger?
Ok, here's the backtrace (I turned off Rails' backtrace silencers):
The problem is at lib/pdfkit/configuration.rb:20:
def wkhtmltopdf @wkhtmltopdf ||= (defined?(Bundler::GemfileError) ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp end
Apparently I don't have
My quick fix is to redefine the method in an initializer:
require 'pdfkit' class PDFKit class Configuration def wkhtmltopdf @wkhtmltopdf ||= `which wkhtmltopdf`.chomp end end end