Open pudiva opened 11 years ago
Had this problem myself when using via asciidoctor-pdf on Windows 11. I had to re-install ghostscript to a path that had no spaces and I set the GS
environment variable like this:
set GS=C:\\Dev\\Tools\\gs\\gs10.01.2\\bin\\gswin64c.exe
(asciidoctor-pdf copies this environment variable to RGhost::Config::GS[:path]
)
Setup
Windows 7 --- Microsoft Windows [versão 6.1.7601] Ghostscript GPL 9.10 --- GPL Ghostscript 9.10 (2013-08-30) Ruby 1.9.3 --- ruby 1.9.3p448 (2013-06-27) [i386-mingw32]
How to reproduce
Run teh test program in teh docs with
RGhost::Config::GS[:path]
set to anything containing spaces. For example:which gave me
Source of problem
I tracked teh problem down to gs_alone.rb:15
It will work, if you put quotes around, like this:
But not if you put teh quotes inside teh string, like this:
because this path can't be found by gs_alone.rb:12
Conclusion
It will probably break on linuxes and macs too. Must escape teh path, or warn users.