Forum: Ruby on Rails Newbie file download question

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.
Chris M. (Guest)
on 2006-01-06 16:39
(Received via mailing list)
Hi to everyone on the list. I'm a newbie to ruby on rails but so far i'm
liking every second of development with it.
That said, i have a minor problem using the send_file method.

My application takes an uploaded file and writes it to the file system,
i run some ruby code to parse the file and convert it to xml. All of
runs without a problem. However, when i try to push the file for the
user to
download, i get the following error:

IndexError in File#download
index 543879 out of string

here is the trace
#{RAILS_ROOT}/app/controllers/file_controller.rb:12:in `download'

right now the files reside in a directory i created called work, but i
the same error when i put the files into the public directory

does anybody have any suggestions?

Thanks in advance for the help

Chris M.
This topic is locked and can not be replied to.