arc icon indicating copy to clipboard operation
arc copied to clipboard

Local dev in Windows 10 doesn't raise Error when missing convert cmd

Open axedbits opened this issue 9 years ago • 3 comments

Hi, I was fighting against this for a little while, shouldn't it raise an error if the System.find_executable(program) fails?

I was trying to generate a thumbnail but it was throwing image: 'is invalid' when doing cast_attachments, but it was still saving the original (that didn't have transforms).

In my case the problem was that I didn't have ImageMagick installed.

Just an heads up for anyone facing the same issue, thanks

axedbits avatar Nov 02 '16 17:11 axedbits

We do currently raise an error when an executable does not exist.

https://github.com/stavro/arc/blob/master/lib/arc/transformations/convert.ex#L20-L23

Can you elaborate on the behavior you are seeing?

stavro avatar Nov 03 '16 17:11 stavro

I was also referring to that line, it should raise an error but it wasn't. Instead it was only returning the changeset with image: 'is invalid'.

I'm developing locally in a win 10 pc, in my case I solved it by installing ImageMagick, since the problem was the missing convert cmd.

I just posted this because others may face the same issue and not realize that they need to install ImageMagick manually.

So it could be a nice idea to add a note, that you need to install ImageMagick if developing locally in windows, to the documentation.

Thanks

axedbits avatar Nov 07 '16 13:11 axedbits

@stavro It seems as if convert is already an existing command on windows. More information on imagemagick site about this issue. This is why no error is raised. I'm sure you are aware but I think maybe more people are reading this issue.

https://www.imagemagick.org/Usage/windows/#convert_issue

@axedbits How did you make it work with convert command on windows? Installing imagemagick does not override the windows command according to the documentation and I see no clean workaround.

nilsivanson avatar Oct 03 '18 17:10 nilsivanson