another attachment_fu on Windows problem

I've started from Mike Clark's tutorial as well. The base image gets saved fine, but the thumbnails don't get created and the resizing is not working either.

I've read the following thread about this:

http://groups.google.com/group/rubyonrails-talk/browse_frm/thread/2150d2ebe267545a/15018dcf54d5ff7b?lnk=gst&q=attachment_fu+windows#15018dcf54d5ff7b

But it seems like my problem is slightly different, because the size attribute is NOT zero. At least not in the database. Maybe I'm misunderstanding the problem, and the error is with a file size = 0 earlier in the process, even though it eventually gets saved with the right value.

I'm using ImageScience as recommended. I noticed in the AFU Readme that the :resize_to option specifically mentions RMagick. Does resizing only work with RMagick?

Other threads talk about making sure your model has a parent_id column. My model does have parent_id, but I found another thread on this problem (which I've lost now) where they had to modify AFU to set the thumbnail.parent_id because of a change in the arguments passed to a certain method, like a post-save method, something like that.

I'm using InstantRails2 on WinXP. I'm pretty much a rails newb, so I could be missing or screwing up very basic stuff

Would appreciate any help, thanks

bumping for new looks in the morning, please help

Follow this procedure to find the cause, then google for the correct solution:

• After uploading an image file, check the database and look if the content_type column is image/jpeg, image/png, …

=> Yes, check out option 2

=> No, it’s application/octet-stream: you are probably using SWFUpload or a Flash uploader, they don’t pass in the correct mime type. The easiest way is to patch attachment_fu’s uploaded_data= method to try and determine the content type if it’s application/octet-stream

• ImageScience or its dependencies aren’t installed properly, reinstall them.

Best regards

Peter De Berdt

Thanks for the reply. The content_type is 'image/pjpeg', not 'image/ jpeg'. Am I being nit-picky, or does that indicate a problem?

Also, down the road I'll probably end up using a host like DreamHost. I think they use RMagick. In that case should I just get it working with Rmagick instead of ImageScience?