Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make more informative error messages #21

Open
yagarea opened this issue Apr 7, 2023 · 2 comments
Open

Make more informative error messages #21

yagarea opened this issue Apr 7, 2023 · 2 comments

Comments

@yagarea
Copy link

yagarea commented Apr 7, 2023

bundle exec jekyll serve --trace --drafts
Configuration file: /Web/_config.yml
             LaTeX: 3 macros loaded (1 updated)
            Source: /Web
       Destination: /Web/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
bundler: failed to load command: jekyll (/Web/vendor/bundle/ruby/3.3.0+0/bin/jekyll)
/Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:37:in `rescue in dispatch': Unmatched sequence on line 7 (RuntimeError)
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:31:in `dispatch'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:18:in `scan'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier.rb:28:in `block in beautify'
	from <internal:kernel>:90:in `tap'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier.rb:27:in `beautify'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-tidy-0.2.2/lib/jekyll/tidy.rb:31:in `output_clean'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-tidy-0.2.2/lib/jekyll/tidy.rb:58:in `block in <top (required)>'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:103:in `block in trigger'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `trigger'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/page.rb:179:in `trigger_hooks'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:573:in `render_regenerated'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:564:in `block in render_pages'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `render_pages'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:211:in `render'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in `process'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
	from /Web/vendor/bundle/ruby/3.3.0+0/bin/jekyll:25:in `load'
	from /Web/vendor/bundle/ruby/3.3.0+0/bin/jekyll:25:in `<top (required)>'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli/exec.rb:58:in `load'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli/exec.rb:58:in `kernel_load'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli/exec.rb:23:in `run'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli.rb:491:in `exec'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli.rb:34:in `dispatch'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli.rb:28:in `start'
	from /.rubies/ruby-yjit/lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle:45:in `block in <top (required)>'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
	from /.rubies/ruby-yjit/lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle:33:in `<top (required)>'
	from /.local/share/gem/ruby/3.0.0/bin/bundle:25:in `load'
	from /.local/share/gem/ruby/3.0.0/bin/bundle:25:in `<main>'
/Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:33:in `dispatch': Unmatched sequence (RuntimeError)
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:18:in `scan'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier.rb:28:in `block in beautify'
	from <internal:kernel>:90:in `tap'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier.rb:27:in `beautify'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-tidy-0.2.2/lib/jekyll/tidy.rb:31:in `output_clean'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-tidy-0.2.2/lib/jekyll/tidy.rb:58:in `block in <top (required)>'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:103:in `block in trigger'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `trigger'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/page.rb:179:in `trigger_hooks'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:573:in `render_regenerated'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:564:in `block in render_pages'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `render_pages'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:211:in `render'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in `process'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	from /Web/vendor/bundle/ruby/3.3.0+0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
	from /Web/vendor/bundle/ruby/3.3.0+0/bin/jekyll:25:in `load'
	from /Web/vendor/bundle/ruby/3.3.0+0/bin/jekyll:25:in `<top (required)>'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli/exec.rb:58:in `load'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli/exec.rb:58:in `kernel_load'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli/exec.rb:23:in `run'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli.rb:491:in `exec'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli.rb:34:in `dispatch'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/cli.rb:28:in `start'
	from /.rubies/ruby-yjit/lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle:45:in `block in <top (required)>'
	from /.rubies/ruby-yjit/lib/ruby/3.3.0+0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
	from /.rubies/ruby-yjit/lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle:33:in `<top (required)>'
	from /.local/share/gem/ruby/3.0.0/bin/bundle:25:in `load'
	from /.local/share/gem/ruby/3.0.0/bin/bundle:25:in `<main>'
make: *** [makefile:6: run] Error 1

I do not know what is wrong and how do I fix it. Please make error messages more informative. For example:

In project/file.html is bad sequence on line 43

@JohJakob
Copy link

JohJakob commented Feb 6, 2024

I am encountering the exact same error, but only in one project. In another one which is nearly identical in regards to configuration, it works for some reason.

Still investigating

@JohJakob
Copy link

JohJakob commented Feb 6, 2024

It appears like this is related to #20. The addition to _config.yml mentioned in this comment fixes this issue for me.

jekyll_tidy:
  exclude:
    - '**/*.scss'
    - '**/*.js'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants