While inserting data in a db (sqlite3) I get following error
Encoding::UndefinedConversionError ("\xF0" from ASCII-8BIT to UTF-8):
In database.yml file, I have provided the encoding as UTF-8
development:
<<: *default
database: db/development.sqlite3
encoding: utf8
Even sqlite is configured to accept UTF-8 (PRAGMA encoding returns UTF-8).
Still the query is rolling back -
(0.1ms) begin transaction
SQL (1.0ms) INSERT INTO "chat_data_regulars" ("username", "chat_timestamp", "name", "sent_text", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["username", "a5fbf8bb6fea32fbbcc566c744592136"], ["chat_timestamp", "2016-05-14 04:12:16.942722"], ["name", "Tushar Saurabh"], ["sent_text", "You gave your mentee critical feedback"], ["created_at", "2016-05-14 04:12:33.308923"], ["updated_at", "2016-05-14 04:12:33.308923"]]
(12.6ms) commit transaction
(0.1ms) begin transaction
(0.2ms) rollback transaction
Completed 500 Internal Server Error in 16416ms (ActiveRecord: 14.5ms)
Encoding::UndefinedConversionError ("\xF0" from ASCII-8BIT to UTF-8):
#encoding: utf-8at the very top of you model filebacktrace_silencers.rbinitializer? And what ruby + rails version do you use?