I figured this out and hope he can help someone else:
# Return true if the headers match on file1 and file2 def compare_csv_files(file1, file2) file1_first_line = CSV.parse File.open(file1) {|f| f.readline} file2_first_line = CSV.parse File.open(file2) {|f| f.readline} return file1_first_line == file2_first_line end
Tom rossi
source share