Showing file position with FasterCSV

Hi -

I’m trying to get the file position with FasterCSV to show progress:

csv = FasterCSV.open(path_to_file, “r”)
file_size = File.size(path_to_file)

for row in csv
position = csv.tell # this only returns 0…

do stuff…

end

I only get 0 using csv.tell or csv.pos – any idea what I’m doing wrong
or how to accomplish what I’m trying to?

Thanks!

This ends up working, my bad.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs