Forum: Ruby on Rails Newbie file download question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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,
then
i run some ruby code to parse the file and convert it to xml. All of
this
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
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/streaming.rb:57:in
`[]='
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/streaming.rb:57:in
`send_file'
#{RAILS_ROOT}/app/controllers/file_controller.rb:12:in `download'

right now the files reside in a directory i created called work, but i
get
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.