I recently came accross this error while working on a rails app
ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x98\x84' for column ...
A bit search shows that this error is famously known. You can see more details from here and here.
In short, this error happens because Mysql uses 3 bytes for utf8 character by default. So when a 4-byte character is sent, it crashes.
Solution: use encoding utf8mb4 and collation utf8mb4_unicode_ci
adapter: mysql2
encoding: utf8mb4
collation: utf8mb4_unicode_ci
If you can, stay away from mysql and use postgresql...