title: Postgres locale error on remote server
body: <p>I am using a remote server from Digital Ocean set up with Ubuntu 14.04, Rails and am having issues with missing locale settings. I have googled the issue and have tried them which didn't work for me.</p>
  
  <h2>Examples</h2>
  
  <pre><code>sudo locale-gen en_US en_US.UTF-8
  sudo dpkg-reconfigure locales 
  </code></pre>
  
  <h2>Error received when trying to create a new Postgres user</h2>
  
  <pre><code>perl: warning: Setting locale failed.
  perl: warning: Please check that your locale settings:
  LANGUAGE = (unset),
  LC_ALL = (unset),
  LC_CTYPE = "UTF-8",
  LANG = "en_US.UTF-8"
  are supported and installed on your system.
  perl: warning: Falling back to the standard locale ("C")
  </code></pre>
  
  <h2>My -locale settings</h2>
  
  <pre><code>locale: Cannot set LC_CTYPE to default locale: No such file or   directory
  locale: Cannot set LC_ALL to default locale: No such file or directory
  LANG=en_US.UTF-8
  LANGUAGE=
  LC_CTYPE=UTF-8
  LC_NUMERIC="en_US.UTF-8"
  LC_TIME="en_US.UTF-8"
  LC_COLLATE="en_US.UTF-8"
  LC_MONETARY="en_US.UTF-8"
  LC_MESSAGES="en_US.UTF-8"
  LC_PAPER="en_US.UTF-8"
  LC_NAME="en_US.UTF-8"
  LC_ADDRESS="en_US.UTF-8"
  LC_TELEPHONE="en_US.UTF-8"
  LC_MEASUREMENT="en_US.UTF-8"
  LC_IDENTIFICATION="en_US.UTF-8"
  LC_ALL=
  </code></pre>