-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.5.3 cannot handle windows paths with spaces #183
Comments
Test and patch once I get off work, unless this has already been solved |
This gist allows you to reproduce the error with 0.5.3 |
Reverting from 0.5.4 to 0.5.2 worked for me, and also fixed not being able to have spaces in options like :header_center => "Document #{number}". |
So the issue arises from the usage of 1.9.3-p448 :001 > require 'shellwords'
=> true
1.9.3-p448 :002 > p = ["C:/Program Files/ruby/ruby.exe", "foo"]
=> ["C:/Program Files/ruby/ruby.exe", "foo"]
1.9.3-p448 :003 > p.shelljoin
=> "C:/Program\\ Files/ruby/ruby.exe foo" The problem is that not using One solution to this is to exclude the path for |
wkhtmltopdf on Windows by default installs itself under C:\Program Files\wkhtmltopdf
Using the config block to point to this path results in an error when the command is put together because it needs "" around the command.
When I set the config option as '"c:/Program Files/wkhtmltopdf/wkhtmltopdf.exe"' then the File.exists? check on line 31 fails. Leaving it empty bombs out because of the use of 'which' to find the correct command and various other combinations ended up in bitter failure.
0.5.2 works.
The text was updated successfully, but these errors were encountered: