Jekyll 4.1.1, MacOS 11.0.1, several 100 pages. For about 2 months or so, livereload is no longer working. It claims LiveReload address: http://0.0.0.0:35729 after the serve command, but I see no reload script injection in my header files. Livereload has been discussed here, but nothing seems applicable to my case. Jekyll doctor reports no problems. I also switched default browsers (Safari/FireFox). For what it’s worth, below is my config file (sorry for the overkill, but I have a dim recollection that the problems started after I edited something there).
Any advice welcome!
# Site settings
email: michael.bach@uni-freiburg.de
description: ""
baseurl: ""
url: "https://michaelbach.de"
author: Michael Bach
githubUsername: michaelbach
twitter_username: MichaelBach99
google_analytics: XYZ
encoding: UTF-8
timezone: Europe/Berlin
# Build settings
destination: /Users/bach/Sites/michaelbach.de.nosync.noindex.nobackup
cache_dir: .jekyll-cache.noindex.nosync
markdown: kramdown
production: true
incremental: true
open_url: true
livereload: true
#force_polling: true
strict_front_matter: true
highlighter: rouge
host: 0.0.0.0 # allows: http://mdp15.local:4000/ (via Bonjour)
future: true # process posts with date in future
liquid:
error_mode: strict
strict_filters: true
strict_variables: false
plugins:
- jekyll-seo-tag
defaults:
language: "en"
locale: en_DE
compress_html: # settings for _layout "compress.html"
clippings: all
comments: all
endings: all
blanklines: false
profile: false
exclude:
- .sass-cache/
- .jekyll-cache.noindex.nosync
- __doNotProccess/
- gemfiles/
- Gemfile
- Gemfile.lock
- Makefile
- makefile
- fract/FrACT10/_cappDevelop/
sass:
sass_dir: /assets/css/_sass
style: compressed # minification of compiled CSS
sourcemap: never # or "development"
# needed for 'jekyll-tagging'
tag_page_layout: tag_page
tag_page_dir: tag
I tried building a new Jekyll site (via jekyll new), but using your config. The live-reloading worked correctly, as long as the page had a <head> element.
You might want to check that live-reload generally works with a quick jekyll-new test. I.e.:
jekyll new foo
cd foo
bundle exec jekyll serve --open-url --livereload
# now edit index.markdown to see if page reloads
Thank you! I indeed found that live-reloading worked with a new site, even with a --blank one. Then followed hours, yes, of debugging. Not to bore you, the final outcome: an include file “head.html” had the <head> tag missing! So trivial. Just deeply hidden by language haggling for the <html> tag, and in fact already suggested here on the forum. What added to the problem: although my <head> tag was missing, it was automatically generated by Jekyll…
Now I would like to tag this as “solved”, but I can’t find the pertinent gadget anywhere.
Ah, I know why: I had not categorized this as “Help”. On re-categorizing it, the “Solution” checkbox is obvious. Wasn’t there something similar in one thread here recently?
you don’t need a browser plugin if it works correctly. Mine works fine out of the box. Do you get errors like the other post has? you may need to run it with --trace
That plugin is an interesting solution.
You can also do it thru gulp or npm and then you have the advantage of the site rebuilding when you edit the config file which jekyll doesn’t do.
bundle exec jekyll serve --open-url --livereload
Configuration file: /home/steveng/test-event.github.io/_config.yml
Source: /home/steveng/test-event.github.io
Destination: /home/steveng/test-event.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.509 seconds.
Auto-regeneration: enabled for '/home/steveng/test-event.github.io'
LiveReload address: http://127.0.0.1:35729
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
[2022-03-21 06:59:53] ERROR `/favicon.ico' not found.
Regenerating: 1 file(s) changed at 2022-03-21 07:01:54
_posts/2022-03-20-welcome-to-jekyll.markdown
Jekyll Feed: Generating feed for posts
...done in 0.07109357 seconds.
Regenerating: 1 file(s) changed at 2022-03-21 07:02:41
_posts/2022-03-20-welcome-to-jekyll.markdown
Jekyll Feed: Generating feed for posts
...done in 0.066175063 seconds.
The follow input doesn’t work
jekyll server
Input with message ("jekyll server"tutorial June 2020, with Jekyll ??)
jekyll server
/usr/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/error.rb:105: warning: constant DidYouMean::SPELL_CHECKERS is deprecated
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.3.9). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.9`.
Resolving dependencies...
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86_64-linux, ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86_64-linux, ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86_64-linux, ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
The dependency http_parser.rb (~> 0.6.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86_64-linux, ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
/usr/lib/ruby/2.7.0/fileutils.rb:105: warning: already initialized constant FileUtils::VERSION
/home/steveng/gems/gems/fileutils-1.6.0/lib/fileutils.rb:105: warning: previous definition of VERSION was here
/usr/lib/ruby/2.7.0/fileutils.rb:1284: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/home/steveng/gems/gems/fileutils-1.6.0/lib/fileutils.rb:1269: warning: previous definition of S_IF_DOOR was here
/usr/lib/ruby/2.7.0/fileutils.rb:1568: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/home/steveng/gems/gems/fileutils-1.6.0/lib/fileutils.rb:1557: warning: previous definition of DIRECTORY_TERM was here
/usr/lib/ruby/2.7.0/fileutils.rb:1626: warning: already initialized constant FileUtils::OPT_TABLE
/home/steveng/gems/gems/fileutils-1.6.0/lib/fileutils.rb:1615: warning: previous definition of OPT_TABLE was here
/usr/lib/ruby/2.7.0/fileutils.rb:1685: warning: already initialized constant FileUtils::LOW_METHODS
/home/steveng/gems/gems/fileutils-1.6.0/lib/fileutils.rb:1674: warning: previous definition of LOW_METHODS was here
/usr/lib/ruby/2.7.0/fileutils.rb:1692: warning: already initialized constant FileUtils::METHODS
/home/steveng/gems/gems/fileutils-1.6.0/lib/fileutils.rb:1681: warning: previous definition of METHODS was here
Configuration file: /home/steveng/test-event.github.io/_config.yml
Source: /home/steveng/test-event.github.io
Destination: /home/steveng/test-event.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
/usr/lib/x86_64-linux-gnu/ruby/2.7.0/strscan.so: warning: already initialized constant StringScanner::Version
/usr/lib/x86_64-linux-gnu/ruby/2.7.0/strscan.so: warning: already initialized constant StringScanner::Id
/usr/lib/ruby/2.7.0/cgi/core.rb:18: warning: already initialized constant CGI::CR
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:18: warning: previous definition of CR was here
/usr/lib/ruby/2.7.0/cgi/core.rb:21: warning: already initialized constant CGI::LF
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:21: warning: previous definition of LF was here
/usr/lib/ruby/2.7.0/cgi/core.rb:24: warning: already initialized constant CGI::EOL
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:24: warning: previous definition of EOL was here
/usr/lib/ruby/2.7.0/cgi/core.rb:26: warning: already initialized constant CGI::REVISION
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:26: warning: previous definition of REVISION was here
/usr/lib/ruby/2.7.0/cgi/core.rb:29: warning: already initialized constant CGI::NEEDS_BINMODE
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:29: warning: previous definition of NEEDS_BINMODE was here
/usr/lib/ruby/2.7.0/cgi/core.rb:32: warning: already initialized constant CGI::PATH_SEPARATOR
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:32: warning: previous definition of PATH_SEPARATOR was here
/usr/lib/ruby/2.7.0/cgi/core.rb:35: warning: already initialized constant CGI::HTTP_STATUS
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:35: warning: previous definition of HTTP_STATUS was here
/usr/lib/ruby/2.7.0/cgi/core.rb:401: warning: already initialized constant CGI::MAX_MULTIPART_COUNT
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/core.rb:401: warning: previous definition of MAX_MULTIPART_COUNT was here
/usr/lib/ruby/2.7.0/cgi/util.rb:30: warning: already initialized constant CGI::Util::TABLE_FOR_ESCAPE_HTML__
/home/steveng/gems/gems/cgi-0.3.2/lib/cgi/util.rb:30: warning: previous definition of TABLE_FOR_ESCAPE_HTML__ was here
/usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::ANY
/usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::UTF8
/usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::UTF16LE
/usr/lib/x86_64-linux-gnu/ruby/2.7.0/psych.so: warning: already initialized constant Psych::Parser::UTF16BE
Liquid Exception: superclass mismatch for class StringIO in /home/steveng/test-event.github.io/_posts/2022-03-20-welcome-to-jekyll.markdown
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
Traceback (most recent call last):
57: from /home/steveng/gems/bin/jekyll:23:in `<main>'
56: from /home/steveng/gems/bin/jekyll:23:in `load'
55: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
54: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
53: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
52: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
51: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
50: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
49: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
48: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
47: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
46: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
45: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
44: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
43: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
42: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
41: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:210:in `render'
40: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:530:in `render_docs'
39: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:530:in `each_value'
38: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:531:in `block in render_docs'
37: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:531:in `each'
36: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:532:in `block (2 levels) in render_docs'
35: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
34: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
33: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:80:in `render_document'
32: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:131:in `render_liquid'
31: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:36:in `render!'
30: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:70:in `measure_time'
29: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:37:in `block in render!'
28: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:63:in `measure_bytes'
27: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:38:in `block (2 levels) in render!'
26: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:59:in `measure_counts'
25: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:39:in `block (3 levels) in render!'
24: from /var/lib/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
23: from /var/lib/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
22: from /var/lib/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
21: from /var/lib/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
20: from /var/lib/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:82:in `render'
19: from /var/lib/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/tags/highlight.rb:41:in `render'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/tags/highlight.rb:82:in `render_rouge'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/tags/highlight.rb:82:in `require'
15: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge.rb:69:in `<top (required)>'
14: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge.rb:53:in `load_lexers'
13: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge.rb:53:in `each'
12: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge.rb:54:in `block in load_lexers'
11: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge/lexer.rb:532:in `load_lexer'
10: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge/lexer.rb:532:in `load'
9: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge/lexers/lasso.rb:4:in `<top (required)>'
8: from /var/lib/gems/2.7.0/gems/rouge-3.28.0/lib/rouge/lexers/lasso.rb:4:in `require'
7: from /usr/lib/ruby/2.7.0/yaml.rb:4:in `<top (required)>'
6: from /usr/lib/ruby/2.7.0/yaml.rb:4:in `require'
5: from /usr/lib/ruby/2.7.0/psych.rb:15:in `<top (required)>'
4: from /usr/lib/ruby/2.7.0/psych.rb:15:in `require'
3: from /usr/lib/ruby/2.7.0/psych/nodes.rb:2:in `<top (required)>'
2: from /usr/lib/ruby/2.7.0/psych/nodes.rb:2:in `require'
1: from /usr/lib/ruby/2.7.0/psych/nodes/node.rb:2:in `<top (required)>'
/usr/lib/ruby/2.7.0/psych/nodes/node.rb:2:in `require': superclass mismatch for class StringIO (TypeError)
Error
Liquid Exception: superclass mismatch for class StringIO in /home/zxz/ccb-event.github.io/_posts/2022-03-20-welcome-to-jekyll.markdown
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
I am having the same issue. I dont know how to fix this. I tried using --watch and I also tried --livereload. both options do not work. I have to restart the server everytime. When I make a change, I never see the terminal show a “n file(s) changed at xxxx” line and it never regenerates. i am on windows running natively (not using wsl). The terminal I am using is powershell.
The command I am using is bundle exec jekyll serve --incremental --livereload
A thought: in your _config.ymlfile, does it perhaps say livereload: false ? Many command line switches have a config equivalent.
And another thought: If you got way back in this thread, 1½ years, the reason for me then was that the <head> tag had been missing (not notice due to deep nesting).
I am using the theme called “portfolYOU” on github. and as far as I can tell, there is no config option for that in this theme. im not sure where I should be looking for a <head> tag.