Skip to content

Troubleshooting

Robert Speck edited this page Dec 18, 2017 · 10 revisions

This is an unsorted list of common errors you may or may not encounter while contributing to the JLESC website. We hope, this is not getting any longer. Though, we will add further errors and their solutions, when we or you encounter any.

Any error

Have you tried turning it off and on again?

Some building errors can be solved simply by deleting any previously generated data:

bundle exec jekyll clean

If this alone does not help, remember to update your gemset:

bundle install --without report --clean
bundle clean --force

If you still get errors, try to remove the _site folder with

rm -rf _site

Liquid Exception: "undefined method destroy!' for nil:NilClass in ..."

In case you get something like

Configuration file: /path/to/jlesc.github.io/_config.yml
            Source: /path/to/jlesc.github.io
       Destination: /path/to/jlesc.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... undefined methoddestroy!' for nil:NilClass
Liquid Exception: undefined method destroy!' for nil:NilClass in .../jlesc.github.io/_events_past/2015-06-29-3rd-jlesc-workshop/schedule.html
jekyll 3.1.1 | Error: undefined methoddestroy!' for nil:NilClass`

when running jekyll serve --watch during local testing, this could be related to a missing/corrupt installation of ImageMagick's command line tool. Try to (re)install it!

Liquid Exception: "\xE6" on US-ASCII

In case you get something like the following output when running Jekyll:

$ jekyll serve --watch
Configuration file: /path/to/jlesc.github.io/_config.yml
            Source: /path/to/jlesc.github.io
       Destination: /path/to/jlesc.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    "\xE6" on US-ASCII
  Liquid Exception: "\xE6" on US-ASCII in _includes/head.html, included in _layouts/default.html
jekyll 3.0.1 | Error:  "\xE6" on US-ASCII

then your LC_ALL environment variable is set to some non-unicode value, e.g. POSIX.

Solution: Make sure your locale environment variables (i.e. LC_ALL, LANG, LANGUAGE and LC_CTYPE) are all set to a UTF-8 variant, e.g. en_US.UTF-8 or de_DE.UTF-8.
You can inspect the value simply by printing out these variables: printenv | grep -E '(LC_ALL|LANG|LANGUAGE|LC_CTYPE)'

For bash-compliant shells this can be done with export LC_ALL=en_US.UTF-8 as a separate command before running Jekyll or command specific by prepending the Jekyll command: LC_ALL=en_US.UTF-8 jekyll serve --watch.

Error: Address already in use - bind(2) for 127.0.0.1:4000

Reason:
Another process on the system -- might be another Jekyll in another terminal session you forgot about -- is already listening on port 4000, thus Jekyll is not able to bind itself to that port to start the local webserver.

Solution:

  1. Make sure, no other Jekyll service is already running.
    E.g. with this command:

     for pid in $(ps cax | grep ruby | grep -o '^[ ]*[0-9]*'); do [[ $(cat /proc/$pid/cmdline | grep jekyll) ]] && echo "jekyll is running"; done
    
  2. Even when no other Jekyll instance is running, other processes might listen to port 4000, thus the easiest way is to tell Jekyll to listen to another port.
    Just add --port 9000 to the command line starting Jekyll:

     bundle exec jekyll serve --watch --incremental --port 9000
    

Travis is not building every PR / commit

First, make sure none of the commits Travis should build contains the string [ci skip] in its message.

In addition, the communication between GitHub and Travis might have hiccups. This happens from time to time.

For details on how to inspect this, see @torbjoernk's comment some time ago.