PDFKit fails on Windows JRuby - IO.popen and Double Quotes
----------------------------------------------------------

                 Key: JRUBY-5692
                 URL: http://jira.codehaus.org/browse/JRUBY-5692
             Project: JRuby
          Issue Type: Bug
          Components: Windows
    Affects Versions: JRuby 1.6
         Environment: jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 
f3b6154) (Java HotSpot(TM) Client VM 1.6.0_21) [Windows XP-x86-java]
            Reporter: Brandon Hauff


PDFKit is a RubyGem for converting HTML/CSS to a PDF using the wkhtmltopdf 
binary.  PDFKit is using IO.popen to call wkhtmltopdf.  The code is at: 
https://github.com/jdpace/PDFKit/blob/master/lib/pdfkit/pdfkit.rb#L58-73

This code runs fine in MRI Windows, MRI Linux, and JRuby Linux.  It fails in 
JRuby Windows.

The error can be seen here: https://gist.github.com/902249

I had a hunch that all of the double quotes, seen on lines 20 and 21 in the 
previous gist, were causing the failure.  So I made a small patch to PDFKit to 
test the theory: https://gist.github.com/902256

This did in fact allow PDFKit to work as intended.  I think the JRuby IO.popen 
on Windows must be doing something different/wrong from MRI, as the double 
quotes don't make a difference there.  On JRuby Linux it work fine as well, so 
it is specific to Windows.

Thanks,

Brandon Hauff

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to