top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Best solution for Mysql error in rails 4 app 'Incorrect string value'?

+2 votes
379 views

I have a rails application, in which I am using delayed_job_active_record gem for running background jobs. While using the method .delay with an object, I am getting the following mysql error:

"INCORRECT STRING VALUE: \'XE2X9CX93"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 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.

posted Jan 5, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Is it is possible to share a Rails 4 session with a Rails 4.1 application with the same secret key base on the same domain name. This works with Rails 4 to Rails 4 but it appears that my cookies are being encrypted differently between the two versions.

Any suggestions?

+1 vote

I am using omni_contacts gem in my application. How can I open Facebook in a popup & after login redirect to the app closing the popup with results ?

Please help?

...