Hi guys,

I have a rails application, in which I am using ‘delayed_job_active_record 
<https://github.com/collectiveidea/delayed_job>’ gem for running background 
jobs. While using the method ‘.delay’ with an object, I am getting the 
following mysql error: 

"*‘Incorrect string value: '\xE2\x9C\x93"\x0A ...' for column 'handler' at 
> row 1"*

 I already searched for the above error and found that its because of the 
difference in encoding in mysql and rails. The solution suggested by many 
programmers is to alter the encoding in mysql database to utf8. But I also 
read <https://mathiasbynens.be/notes/mysql-utf8mb4> that MySQL’s utf8 
charset only partially implements proper UTF-8 encoding. It can only store 
UTF-8-encoded symbols that consist of one to three bytes; encoded symbols 
that take up four bytes aren’t supported. Which might cause trouble in some 
other cases. Also, when I tried to insert the value directly in mysql, it 
worked like a charm. Suggesting that the issue might lie elsewhere. So, can 
anyone please suggest the right method to rectify this problem?

Any help would be greatly appreciated.

Thanks,

Kriti

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/ad73d3be-5cb6-47c3-af6b-9dd1935939f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to