Giter Site home page Giter Site logo

Comments (3)

edmorley avatar edmorley commented on August 17, 2024

@samuel02 Hi! I would try running the locale buildpack prior to the existing buildpacks:
https://github.com/heroku/heroku-buildpack-locale

from heroku-buildpack-ci-postgresql.

samuel02 avatar samuel02 commented on August 17, 2024

@edmorley thanks for the suggestion! I tried updating my app.json to:

{
  "environments": {
    "test": {
      "addons": [
         "heroku-redis:in-dyno",
         "heroku-postgresql:in-dyno"
      ],
      "buildpacks": [
        {"url":  "https://github.com/heroku/heroku-buildpack-locale"},
        {"url":  "https://github.com/heroku/heroku-buildpack-ruby"}
      ],
      "env": {
        "LANG": "sv_SE.utf8"
      }
    }
  }
}

But still getting the same error. I see that it is installing language packs but for some reason Postgres doesn't seem to pick it up? Any ideas?

from heroku-buildpack-ci-postgresql.

edmorley avatar edmorley commented on August 17, 2024

I'm not very familiar with Postgres locales, so not sure.

I would say the issue is one of:

  1. The locales need to be in place before the postgres server is started
  2. The locales need to be in place before the postgres DB is initialised
  3. One of the settings here needs changing/overriding:
    export PGDATA=$BUILD_DIR/.indyno/vendor/postgresql/data
    LC_COLLATE=en_US.UTF-8 \
    LC_CTYPE=en_US.UTF-8 \
    LC_MESSAGES=en_US.UTF-8 \
    LC_MONETARY=en_US.UTF-8 \
    LC_NUMERIC=en_US.UTF-8 \
    LC_TIME=en_US.UTF-8 \
    initdb -E UTF8 | indent

Re (1)/(2): If the in-dyno PG buildpack is automatically added by Heroku CI (due to having heroku-postgresql:in-dyno under the test.addons key in app.json), then it's added before all other buildpacks. If you wanted to try having it run after the locale buildpack, you could remove heroku-postgresql:in-dyno from addons and explicitly add this buildpack to buildpacks (either via the heroku/ci-postgresql buildpack registry alias, or the GitHub URL https://github.com/heroku/heroku-buildpack-ci-postgresql -- in general the buildpack registry aliases are preferred).

To try with (3), I'd first try forking this buildpack, adding it directly to buildpacks and removing heroku-postgresql:in-dyno from addons (as above) and adjusting the settings. If that works you could then try switching back to the non-forked buildpack and seeing if the settings can be updated retrospectively when your CI run starts, to save having to maintain a forked buildpack.

from heroku-buildpack-ci-postgresql.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.