Page 1 of 1

identify console output can't be detected by ruby (and convert works ok)

Posted: 2015-04-14T22:50:40-07:00
by alex29
Windows 7, latest ImageMagick-6.9.1-1-Q16-x64-static.exe
Ruby 1.9 and 2.0
When I try

Code: Select all

`convert` 
from Ruby (backticks mean running external command), it catches all the output (help text in this case).
This doesn't happen with

Code: Select all

`identify` 
the result is always "" (empty string).
Tried redirecting error output, etc - nothing helps.
Is the identify's output somehow different from other tools? Is it easy to fix? My script depends on the output, and fails when running in the mentioned configuration (works with Linux at the same time).

PS The only trick that worked was `echo | identify`, but this is only good for Windows then, not for Unix/Linux.
PPS I'm absolutely sure that there are no other tools in the system with the same name.

Re: identify console output can't be detected by ruby (and convert works ok)

Posted: 2015-04-15T00:02:42-07:00
by snibgo
You could check that ...

Code: Select all

convert >c.txt
identify >i.txt
... c.txt and i.txt contain the expected text. They do for me.

Re: identify console output can't be detected by ruby (and convert works ok)

Posted: 2015-04-15T00:08:43-07:00
by alex29
Yes, they do.
I can't find any differences in the output, if not trying from Ruby. I suspect 'identify' uses a different method of printing, or some IO-redirection.

Re: identify console output can't be detected by ruby (and convert works ok)

Posted: 2015-06-03T07:23:26-07:00
by alex29
Found the source of the problem - COMODO firewall that apparently was blocking/sandboxing communications.