Postgres locale error Postgres locale error postgresql postgresql

Postgres locale error


Thank you very much to Kamal Nasser on the Digital River forums for providing the correct answer (the following commands below requires root privileges):

$ locale-gen en_US en_US.UTF-8 $ dpkg-reconfigure locales

I think this is the correct link to the original answer: the Digital Ocean site is not responding so I can't check it. https://www.digitalocean.com/community/questions/postgresql-and-rails-4


After trying ardochhigh's answer:

$ sudo locale-gen en_US en_US.UTF-8 $ sudo dpkg-reconfigure locales

the problem persisted

After that I saw this answer that solved the problem for me:

https://www.digitalocean.com/community/questions/language-problem-on-ubuntu-14-04

Aparently LAGUAGE shell variable is not set:

$ sudo bash$ export LANGUAGE="en_US.UTF-8"$ echo 'LANGUAGE="en_US.UTF-8"' >> /etc/default/locale$ echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale$ # next: logout and login