Attachment_fu on Windows?

I’ve spent two days in trying to attachment_fu and MiniMagic get work on
Windows.

My solution may be a specific solution in my case, but maybe somebody
will find something usefull…

Finaly I’ve came up with these three steps that were neccecary for me:

  1. little hack in attachment_fu to avoid ‘size is not included in the
    list’ message. Note that this works with MiniMagic, but does not work
    with RMagic.

  2. Install MiniMagic as Plugin (just copying /mini_magick-1.2.0 folder
    in my /vendor/plugin folder with no change to environment.rb)

  3. Finally I’ve mentioned that ImageMagic can’t do anything with files
    with long pathes like “Documents and setting/users/My complicated user
    account/Local Settings/…”, but temporary files are stored there!!!
    I’ve changed local TMP and TEMP variables to c:/TEMP and restart the
    computer and after that everethyng became fine.

Maybe this will helps for somebody, good luck!

PS: sorry for my English, my wife is waiting for me and I have no time
for spell check…

Eric N. wrote:

Well I finally was able to reproduce the infamous zero size error. I’m
not sure if it’s the same one your talking about but if so I think I
have some more clues as to the cause and a possible workaround.

How do you recreate this error? I would like to submit a patch to ruby
core :slight_smile:
-=R

I’ve posted a fix on my blog :

I believe that my fix for the “Size is not included in the list” issue
is better than the timing loop or other fixes I’ve seen on the web.

Also attached is the actual fix that you just need to require to fix the
issue.