Rails FasterCSV “unquoted fields do not allow \r or \n”

后端 未结 3 1153
终归单人心
终归单人心 2020-12-18 07:55

I\'m having an issue with FasterCSV and my rake db:seeds migration. I get the error: \"rake aborted! Unquoted fields do not allow \\r or \\n (line 2)\" on the following se

3条回答
  •  难免孤独
    2020-12-18 08:42

    Use String.encode(universal_newline: true) instead gsub. It converting CRLF and CR to LF # Always break lines with \n

提交回复
热议问题