FasterCSV load file to table

Hello Guys, May be it is simply but any way.... fasterCSV 1.2.0 how to load data from file to table :frowning: I have tried this: file has just one line 1,2,3     data = FCSV.read("C:\\temp_file.csv")     table = FCSV.parse(data, :headers => true)

    puts "data overview"     puts data     puts "table overview"     puts table

but got very strange error: undefined method `pos' for #<Array:0xcb2e114> (<-- this is for another big file) for file with 1,2,3 it shows: undefined method `pos' for [["1", "2", "3"]]:Array

What is reason and what is the "pos"?

Have tried this way...     data = FCSV.read("C:\\temp_file.csv")     csv_output = FasterCSV.generate do |csv|         data.each do |dt|           csv << dt         end     end

    table = FCSV.parse(csv_output, :headers => true)

but does it really good way?

You can use FasterCSV:

data = FasterCSV.foreach('file.csv') { |row| data << row } puts data #data is all loaded now in the 'data' variable

Also, using the (slower) built in libraries:

CSV::Reader.parse(string) { |row| row.each { |cell| puts cell }}

Both these examples are from the really good O'Reilly book, Ruby Cookbook

Thank you!