Reputation: 2678
Can anyone suggest how to recreate issue Mysql2::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT)
This was triggered due API /admin/products
and "action"=>"index".
Error:
/admin/products#GET params: { "controller"=>"admin/products"},
exception: ActiveRecord::StatementInvalid, message: Mysql2::Error:
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation 'like'
Upvotes: 0
Views: 345
Reputation: 6455
You're using the wrong character set. Try using UTF-8, add the following at the top of your offending file:
#!/bin/env ruby
# encoding: utf-8
Upvotes: 1