James Edward Gray II wrote: >> /usr/lib/ruby/gems/1.8/gems/fastercsv-1.2.1/lib/faster_csv.rb:830: >> warning: already initialized constant CSV >> > I would have to see the code to say for sure. My initial thoughts are: > > * CSV is loaded in the script when FCSV tries to build its compatibility > interface > * FCSV won't build a compatibility interface unless you ask it to > * That's the only time FCSV ever touches the CSV namespace I wrote a class called "CSVImport" using the default CSV class. Today, I modified it to work with FasterCSV class by changing the requires as below: begin require 'rubygems' require 'faster_csv' FasterCSV.build_csv_interface rescue require 'csv' end # Rest of the code The above code in a simple test script doesn't generate any warnings. My script works even with FasterCSV.build_csv_interface commented out in the above code fragment. I have included the statements that call CSV (or FasterCSV) methods below: @reader = CSV.open(@csv_file, "r", @col_sep) if has_header @header = @reader.shift else @header = [] end ...... ...... @reader.each do |row| all_count += 1 next if from_row > all_count # accumulate rows count += 1 values = values + row if count == @batch_size || (to_row > 0 && (to_row == all_count)) yield(values, count) count, values = 0, [] end break if to_row > 0 and all_count == to_row end ...... ...... There are no references to any CSV class in my code. Do you think any of these is the culprit?