rake test and error : log writing failed. “\xE2” from ASCII-8BIT to UTF-8

前端 未结 3 1297
谎友^
谎友^ 2021-02-19 09:24

When I run rake test, I get error line every time.

log writing failed. \"\\xE2\" from ASCII-8BIT to UTF-8  

Please guide on this.

3条回答
  •  没有蜡笔的小新
    2021-02-19 10:17

    In my case some weird quotation marks were the culprit so I just replaced them with the safe characters like this,

    msg = error.message.gsub(/[“”]/, "\"").gsub(/[‘’]/,"\'")
    

提交回复
热议问题