I''m trying to upload a text file from a form and read the file into a string in my rails app. I''ve tried using @import_file = File.read(params[:import_file]) as well as File.open, but I need getting "cannot convert StringIO into String" errors. Anyone have any ideas? - Kyle -- Posted via http://www.ruby-forum.com/.
Have you tried @import_file = params[''import_file''].read> I''m trying to upload a text file from a form and read the > file into a string in my rails app. I''ve tried using @import_file > File.read(params[:import_file]) as well as File.open, but I > need getting "cannot convert StringIO into String" errors. > Anyone have any ideas?