I use ruby 1.9.3 and redmine 1.4.4
According to this -> Please help me send a jpg file using send_data , I do that in a controller:
  @file = temp.path
  File.open(@file, 'r') do |f|
    send_data f.read, :filename => "myfile.pdf", :type => "application/pdf", :disposition => "attachment"
  end
  File.delete(@file)
But it returns ArgumentError (invalid byte sequence in UTF-8), why ?