fix Encoding::CompatibilityError#12
Conversation
|
I probably need more use cases to know what's the issues is. Do you mean the Unicode encoding is incorrect? |
|
thank you for reply. first of all, I found important mistake in my below description.
precisely, the error doesn't occur at gem version however at btw I forgot to submit one important log. Using patched gem by me, the execution doesn't stop and this warning message is shown. I guess the multibyte chars with inserting incorrect field type value cause this problem... |
|
If I am not wrong, Ruby version 2 should be Unicode by default. So there is no need to really force any encoding even if you are using Japanese. You are saying using console is working right and only cron gives problem? |
sorry, it is my mistake. when using console, the gem version was Ruby version is |
first of all, this fix is for very rare case :(
under below conditions,
e.messagecan't be encoded correctly.e.message(it's#{name}) isnumericalstringe.messagecauses error as belowto fix it, I append
force_encodingmethod :)note: although executing on console directly no error occurs, on the other hand bycronexecuting error occurs