3

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

SACn
  • 1,862
  • 1
  • 14
  • 29
  • [This](https://stackoverflow.com/questions/36262382/jekyll-says-liquid-exception-invalid-byte-sequence-in-us-ascii-in-documentation?rq=1) solution did not worked. Tried deleting and recreating pages, force update bower, and npm packages - all failed – SACn Jan 13 '17 at 15:45

2 Answers2

1

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.

Maksim Kolchin
  • 517
  • 1
  • 7
  • 17
0

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
SACn
  • 1,862
  • 1
  • 14
  • 29
  • Am able to trace out root cause of this issue. Somehow, Gemfile.lock got committed to GitHub that had created all this trobule. – SACn Jan 14 '17 at 13:01