Forum: Ruby on Rails Attachment_fu, db_file and Windows

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John C. (Guest)
on 2008-10-15 00:45
I'm having trouble serving images which I have saved as db_files with
attachment_fu.  I use this code to serve the images:

Controller --
class PhotoController < ApplicationController
  def image
                          :type => @photo.content_type,
                          :filename => @photo.filename,
                          :disposition => 'inline')

View --
<%=image_tag(url_for(:controller=>'photo', :action=>'image',

On the web page, I just get a box with a red X in it where the image
should be.  This occurs only on my development machine (windows XP) but
not on my production machine (linux).  On my production machine all
works perfectly.

To debug, I switched :disposition=>'inline' to
:disposition=>'attachment', downloaded the file, and opened with GIMP.
GIMP reports these errors:
"Premature end of JPEG file" and
"Invalid JPEG file structure -- missing SOS marker".

Does anyone have any ideas?

I am using ImageScience as my processor.

(BTW, I have already implemented the attachment_fu_patch which fixes
various windows/attachment_fu problems described here --
This topic is locked and can not be replied to.