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?

  • asyncio client server does not work inside docker
  • Mongodb container's data becomes “read-only” after restarting kubernetes, with glusterfs as storage?
  • Intergration of Docker with OpenStack via Docker Heat Plugin
  • linux mke2fs failed: there's no device named /dev/ram0 inside my docker image
  • How to execute a shell command before the ENTRYPOINT via the dockerfile
  • Docker private registry | TLS certificate issue
  • Is it possible to optionally use the docker COPY instruction?
  • Can I suspend and then resume Docker container?
  • How do you manage per-environment data in Docker-based microservices?
  • docker exec command with Popen in Python
  • Rancher can pull images from private registry
  • After running the cygnus docker, it exists immediately (no errors though)
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.