ENV[“VARIABLE”].encoding return #<Encoding:ASCII-8BIT> on production when being assigned a unicode string

I’m using ENV[“VARIABLE”] inside my Rails app which being set to a unicode string.
On production (which is a docker container), this ENV[“VARIABLE”] is somehow encoded with Encoding:ASCII-8BIT (though ENV[“PWD”], for instance, is encoded with Encoding:UTF-8). On development, every variable is encoded with Encoding:UTF-8. The encoding of ASCII-8BIT prevent me to render the variable in a view. What is the cause? How could I fix?

  • How to run docker image produced by VS 2017
  • Docker containers linking
  • Setting arguments in docker-compose file
  • Docker: Why is /etc/resolv.conf unreadable? Breaks DNS [closed]
  • Docker client execution
  • Binaries from postgresql not available when linked to another docker container
  • How can I use gitlab and/or docker for my web app?
  • Cleanup disk space occupied by Docker images
  • Decouple and Dockerize Django and Celery
  • How to apply kernel tuning on docker container
  • Mounted docker.sock login not stored
  • user: Current not implemented on linux/amd64 with golang using docker scrtach
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.