Changing locale in app.yml doesn't install discourse

I’m trying to setup discourse with local language. Before doing that I just want to launch a sample droplet with some locale other than en.US.UTF-8

I have changed locale in app.yml

LANG: cs_CZ.UTF-8
DISCOURSE_DEFAULT_LOCALE: cs

And I have setup locale on Ubuntu

sudo locale-gen cs_CZ.UTF-8

Set locale, this generates also the /etc/default/locale file.

update-locale LANG=cs_CZ.UTF-8

but then I got this problem, launcher always exits with ERROR: Config name must not contain upper case characters, spaces or special characters. seeing this locale is a problem

Then I changed locale by exporting locale to en_US.UTF-8 commandline, now script works but then, It doesn’t pickup locale. I’m not sure what I’m missing here.

Please help with any pointers to how install discourse proper way in other different language

Here is the log

postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2018-03-14T02:55:06.463494 #13]  INFO -- : > sleep 5
LOG:  skipping missing configuration file "/shared/postgres_data/postgresql.auto.conf"
2018-03-14 02:55:06.484 UTC [55] FATAL:  data directory "/shared/postgres_data" has group or world access
2018-03-14 02:55:06.484 UTC [55] DETAIL:  Permissions should be u=rwx (0700).
I, [2018-03-14T02:55:11.470550 #13]  INFO -- :
I, [2018-03-14T02:55:11.470820 #13]  INFO -- : > su postgres -c 'createdb discourse' || true
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "cs_CZ.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
createdb: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2018-03-14T02:55:11.547526 #13]  INFO -- :
I, [2018-03-14T02:55:11.548052 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "cs_CZ.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2018-03-14T02:55:11.623152 #13]  INFO -- :
I, [2018-03-14T02:55:11.623665 #13]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "cs_CZ.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2018-03-14T02:55:11.694738 #13]  INFO -- :
I, [2018-03-14T02:55:11.695242 #13]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "cs_CZ.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2018-03-14T02:55:11.765187 #13]  INFO -- :
I, [2018-03-14T02:55:11.765807 #13]  INFO -- : Terminating async processes


FAILED
--------------------
Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 81 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
fa63f85db88334b89b0674ef085175996ca8737a7df323dd47e7ceacebb2772d
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

You can select the language in the setup wizard. Just do a simple install. No need to be heroic.

4 Likes

@pfaffman

Thank you for the reply.

Will try that way

1 Like

Yes. simply discourse changing language after selecting language from the wizard.

My bad :slight_smile: May be I’m thinking too much

Thank you very much

2 Likes