Trying to parse a CSV file, but still getting the error message Unquoted fields do not allow \\r or \\n (line 2)..
I found here at SO similar topic,
First of all, you should set you column delimiters to ';', since that is not the normal way CSV files are parsed. This worked for me:
CSV.open('file.csv', :row_sep => :auto, :col_sep => ";") do |csv|
csv.each { |a,b,c| puts "#{a},#{b},#{c}" }
end
From the 1.9.2 CSV documentation:
Auto-discovery reads ahead in the data looking for the next
\r\n,\n, or\rsequence. A sequence will be selected even if it occurs in a quoted field, assuming that you would have the same line endings there.