My problem is similar to this:
But I can hopefully provide some more information.
Right now I have
... build: environment: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 docker: - image: circleci/ruby:2.3 ...
When running my test I get this output in between:
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
I honestly don’t know which line of code is causing this, as the code doesn’t really try to set the locale as far as I know.
A bit later I get this error:
Encoding::CompatibilityError: [!] incompatible character encodings: US-ASCII and UTF-8
By googling around I found advice to change
c.UTF-8 - and this does indeed solve the problem for me. Both initial warning and crashing error are gone.
Why does this work?
Is there another, better way?
(The project originally is built on macOS, where
en_US.UTF-8 is used and everything is fine.)