Forum: Ruby Showing file position with FasterCSV

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
sa 1. (Guest)
on 2008-11-27 12:59
Hi -

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

csv =, "r")
file_size = File.size(path_to_file)

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

  # do stuff...


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?

sa 1. (Guest)
on 2008-11-27 14:26
This ends up working, my bad.
This topic is locked and can not be replied to.