Rails - number of rows in a file
Posted
by xpepermint
on Stack Overflow
See other posts from Stack Overflow
or by xpepermint
Published on 2010-03-26T23:23:11Z
Indexed on
2010/03/26
23:33 UTC
Read the original article
Hit count: 201
Hey. How can I get a total number of rows in a file (do not want to do it with loop). I'm reading CSV file.
Example 1
CSV.open('clients.csv', 'r')
Example 2
FasterCSV.foreach('clients.csv')
Thx.
© Stack Overflow or respective owner