When you get some wired errors with encoding, for instance
Encoding::InvalidByteSequenceError: "\xC3" on US-ASCII
You can force Ruby to use UTF-8 encoding by:
After that you should restart your application.
I suggest to add this line into environment/profile or your shell config file.
echo "export RUBYOPT=-Ku" > /etc/profile