I already get the records from the ftp server using the gettextfile method and work on each record in this block to finally put it in another place.
This file is a CSV file, and I need to continue using CSV to get the headers and data and put it in the DB after some work. Since I have many different files, I need a general way. I do not want to load all the records into memory or disk, because the files can be very large! So the flow will be good
One idea is to provide an io object for CSV, but I don't see how to do this with Net :: FTP.
I already see "http://stackoverflow.com/questions/5223763/how-to-ftp-in-ruby-without-first-saving-the-text-file", but it works with PUT.
Any help?
source share