thin and PDFkit
-
Marc-André Cournoyer
Hey Steve, try w/ another webserver like webrick or mongrel to see if you can reproduce. If you can, issue is in PDFKit. Although, the warning message you got in the log leads me to think it's a PDFKit issue, maybe you can look at http://prawn.majesticseacreature.com/ ?
-
Steve Alex
I guess I should have read more carefully the other post where I found pdfkit was having problem with thin.
http://xaop.com/blog/2010/08/04/deploying-rails-3-on-ruby-1-9-2/
The main comment:
We use PDFKit to generate PDF exports, and PDFKit doesn't work with Thin for some reason. Requests for PDF versions of a page seem to hang indefinitely. On our development machines, running Mac OS X, it seems to work if we start Thin in threaded mode, but on Ubuntu this makes things unpredictable and often extremely slow to the extent where it is beyond unusable.
It seems to work with the --threaded switch.
It does work with webrick, have not tried mongrel. In looking at the code (and I in no way a ruby guru), there is not much there, it just sets up calls to wkhtmltopdf using middleware to allow a .pdf respond_to. It is really a neat concept. I've used prawn and it is great, but this is so much easier for simple things.
Guess you can close this and if someone else has a problem, just refer to threaded.
Steve
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.