Forum: Ruby on Rails send_file method on windows and webrick

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.
Paul L. (Guest)
on 2005-12-02 21:38
I am developing in a windows xp environment running WEBrick and MySQL,
RoR 0.13.1. I am trying to retrieve the file that I uploaded via Rails
using the send_file() method. Instead of returning the file, the file's
contents are being printed out to the WEBrick console, the browser hangs
for a while, and then an empty file is returned from the download dialog
box (Firefox 1.0.7/IE 6.02). Here is the code I am using to return the
file -

class AttachmentController...

def download
  attachment = Attachment.find(params[:id])
  send_file(attachment.path) #path is


Any ideas or experience with this? I have searched high and low for
related problems but I have come up empty. Any help would be much

This topic is locked and can not be replied to.