-3

Logs

/gems/pdfkit-0.6.2/lib/pdfkit/configuration.rb:22 in "wkhtmltopdf"  
/gems/pdfkit-0.6.2/lib/pdfkit/pdfkit.rb:32 in "initialize"
/gems/pdfkit-0.6.2/lib/pdfkit/middleware.rb:22 in "new"
/gems/pdfkit-0.6.2/lib/pdfkit/middleware.rb:22 in "call"
/gems/warden-1.2.3/lib/warden/manager.rb:35 in "block in call"
/gems/warden-1.2.3/lib/warden/manager.rb:34 in "catch"
/gems/warden-1.2.3/lib/warden/manager.rb:34 in "call"
/gems/actionpack-3.2.17/lib/action_dispatch/middleware/best_standards_support.rb:17 in "call"
/gems/rack-1.4.5/lib/rack/etag.rb:23 in "call"
/gems/rack-1.4.5/lib/rack/conditionalget.rb:25 in "call"
/gems/actionpack-3.2.17/lib/action_dispatch/middleware/head.rb:14 in "call"
/gems/actionpack-3.2.17/lib/action_dispatch/middleware/params_parser.rb:21 in "call"
/gems/actionpack-3.2.17/lib/action_dispatch/middleware/flash.rb:242 in "call"
/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210 in "context"
/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205 in "call"

I am getting this error in Exception(Airbrake). Unable to know where this error comes so unable to fix.

May be this error comes from the pdfkit but When I am testing on my local then it's working fine and also on server that working fine but everyday I am getting this error.

Ernest
  • 8,701
  • 5
  • 40
  • 51
Dipak Panchal
  • 5,996
  • 4
  • 32
  • 68

1 Answers1

2

The wonderful thing about Ruby is it is distributed in source. It was very easy to track down line 22 of configuration.rb:

@wkhtmltopdf ||= (defined?(Bundler::GemfileError) && File.exists?('Gemfile') ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp

So, which wkhtmltopdf returns nil. You need to make sure it doesn't. Consider installing wkhtmltopdf, whatever that is. The instructions in the gem explicitly state this is a required installation step: https://github.com/pdfkit/pdfkit

user229044
  • 232,980
  • 40
  • 330
  • 338