# Attachment\_fu on Windows?

**URL:** <https://www.ruby-forum.com/t/attachment-fu-on-windows/87524>\
**Category:** Rails\
**Created:** [March 3, 2007, 12:49pm UTC](https://www.ruby-forum.com/t/attachment-fu-on-windows/87524 "2007-03-03T12:49:25Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [December 21, 2007, 4:58pm UTC](https://www.ruby-forum.com/t/attachment-fu-on-windows/87524/21 "2007-12-21T16:58:58Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [November 11, 2008, 3:50am UTC](https://www.ruby-forum.com/t/attachment-fu-on-windows/87524/22 "2008-11-11T03:50:24Z")

</div>

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 🙂  
-=R

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [January 18, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/attachment-fu-on-windows/87524/23 "2008-01-18T17:32:48Z")

</div>

I’ve posted a fix on my blog :

> **[Emmanuel's Blog](http://epirsch.blogspot.com/2008/01/fixing-attachmentfu-on-windows-like.html)**
>
> Fixing attachment\_fu on Windows Like many others , I've encountered issue when developing Rails applicat...

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.

[Previous page](https://www.ruby-forum.com/t/attachment-fu-on-windows/87524.md?page=1)
