SACn
SACn

Reputation: 1924

Liquid Exception: invalid byte sequence in US-ASCII in _layouts/redirect.html

I was using gitlab build of jekyll project, all of a sudden started receiving following error. Not able to solve after a lot of trials. What to do in .gitlab-ci.yml file to resolve this (*error not appearing in local machine, both .gitlab-ci.yml and locally uses "grunt build" command).

Liquid Exception: invalid byte sequence in US-ASCII in _layouts/redirect.html

Upvotes: 3

Views: 745

Answers (2)

Maksim Kolchin
Maksim Kolchin

Reputation: 507

This solution worked for me.

Put:

before_script:
  - apt-get update >/dev/null
  - apt-get install -y locales >/dev/null
  - echo "en_US UTF-8" > /etc/locale.gen
  - locale-gen en_US.UTF-8
  - export LANG=en_US.UTF-8
  - export LANGUAGE=en_US:en
  - export LC_ALL=en_US.UTF-8

In before_script directive in your .gitlab-ci.yml.

Upvotes: 1

SACn
SACn

Reputation: 1924

Solved this very tricky issue by following:

  • Disable & Re-enable GitLab CI Runner
  • Deleted Gemfile.lock from the Runner (Commit)
  • Deleted folders node_modules and bower_components
  • Re-compiled project using last successful .gitlab-ci.yml and GemFile
  • Replaced .gitlab-ci.yml and GemFile to latest versions

Upvotes: 0

Related Questions