I\'m trying to work out how to get the current line/row number from Ruby CSV. This is my code:
options = {:encoding => \'UTF-8\', :skip_blanks => true}
Here's an alternative solution:
options = {:encoding => 'UTF-8', :skip_blanks => true} CSV.foreach("data.csv", options).with_index do |row, i| puts i end