I am upgrading Rails 4.1 app to use Ruby 2.2. During upgrade it turned out that the app used old version of pg gem (0.12) and gem was not installing using Ruby 2.2. So I tried to use newer version of pg gem (0.17.1). Now I sometimes get following error when a new user is created in the system:
PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8"
Are there any known issues with Ruby 2.2 and Postgres?
Looks like application is configured to use unicode: config.encoding = "utf-8"
is set in application.rb and encoding: unicode
is in database.yml
SQL statement:
INSERT INTO "users" (
"confirmation_sent_at",
"confirmation_token",
"created_at",
"email",
"encrypted_password",
"first_name",
"last_name",
"updated_at")
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
RETURNING "id"