On Jan 23, 2011, at 9:21 AM, Dot Baiki wrote:

> This way seems to be right, but now somehow the :header_converters =>
> :symbol is not working anymore. This is the header line from the CSV
> file:
> 
> Emp No.;AC-No.;No.;Name;Auto-Assign;Date;Timetable;On duty;Off
> duty;Clock In;Clock Out;Normal;Real time;Late;Early;Absent;OT Time;Work
> Time;Exception;Must C/In;Must
> C/Out;Department;NDays;WeekEnd;Holiday;ATT_Time;NDays_OT;WeekEnd_OT;Holiday_OT
> 
> But since I use read() (even if I use header_converters => :symbol) the
> header line is not converted. I really don't understand it anymore. This
> is now my header line:
> 
> ["Emp No.", "AC-No.", "No.", "Name", "Auto-Assign", "Date", "Timetable",
> "On duty", "Off duty", "Clock In", "Clock Out", "Normal", "Real time",
> "Late", "Early", "Absent", "OT Time", "Work Time", "Exception", "Must
> C/In", "Must C/Out", "Department", "NDays", "WeekEnd", "Holiday",
> "ATT_Time", "NDays_OT", "WeekEnd_OT", "Holiday_OT"]
> 
> Is there no way to say during import/conversion that column "Emp No."
> shall be untouched (expect the header conversion)?
> 
> This is what I use now:
> csv_data = FCSV.read(input_file, :col_sep => ';', :skip_blanks => true,
> :header_converters => :symbol)

The bug is that you dropped :headers => true.  Add that back and you are all set.