Skip to content

Instantly share code, notes, and snippets.

@mediasota
Last active September 15, 2015 06:46
Show Gist options
  • Save mediasota/8e5fefc97311ed8575c5 to your computer and use it in GitHub Desktop.
Save mediasota/8e5fefc97311ed8575c5 to your computer and use it in GitHub Desktop.
Fix 'encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError) on ubuntu

Sometimes in a newly created server you can get this error when starting a ruby app:

 `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)

To fix simple export this variables or add to your ~/.bash_profile

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Don't forget to 'source ~/.bash_profile'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment