jeffpar / pcjs

The original IBM PC and other machine emulations in JavaScript
https://www.pcjs.org
Other
822 stars 124 forks source link

Failure to run on Windows. #11

Closed agr closed 3 years ago

agr commented 3 years ago

I am trying to follow the "running locally" guide on Windows 10 machine. Everything worked fine until step 5, which produces the following output:

>bundle exec jekyll serve
Configuration file: C:/Users/zzz/source/repos/pcjs/_config.yml
            Source: C:/Users/zzz/source/repos/pcjs
       Destination: C:/Users/zzz/source/repos/pcjs/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
  Liquid Exception: Liquid syntax error (line 3): 'raw' tag was never closed in documents/books/mspl13/msdos/encyclopedia/appendix-d/index.md
jekyll 3.9.0 | Error:  Liquid syntax error (line 3): 'raw' tag was never closed
Traceback (most recent call last):
        33: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
        32: from C:/Ruby27-x64/bin/jekyll:23:in `load'
        31: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/exe/jekyll:15:in `<top (required)>'
        30: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        29: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        28: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        27: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        26: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        25: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
        24: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `start'
        23: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `each'
        22: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start'
        21: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:36:in `process'
        20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:65:in `build'
        19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/command.rb:28:in `process_site'
        18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:71:in `process'
        17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:192:in `render'
        16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:471:in `render_pages'
        15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:471:in `each'
        14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:472:in `block in render_pages'
        13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:479:in `render_regenerated'
        12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/renderer.rb:62:in `run'
        11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/renderer.rb:79:in `render_document'
        10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/renderer.rb:121:in `render_liquid'
         9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
         8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
         7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-3.9.0/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
         6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:116:in `parse'
         5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:132:in `parse'
         4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/document.rb:5:in `parse'
         3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/document.rb:10:in `parse'
         2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:34:in `parse'
         1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tag.rb:10:in `parse'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/liquid/tags/raw.rb:22:in `parse': Liquid syntax error (line 3): 'raw' tag was never closed (Liquid::SyntaxError)

Any idea what might be causing it? From what I can see the file referenced in the error does have the {% endraw %} tag. Does it interpret one of the characters in the file as EOF?

agr commented 3 years ago

Hm... seems the EOF idea is correct. Deleting the

 ^Z          26       1A        SUB      (Substitute)

line made it work.

jeffpar commented 3 years ago

Ah, sorry, looks like another windows vs *nix gotcha that I hadn't run into before (like line-endings and backslashes). I don't try running on Windows very often. I'll look at a work-around.

jeffpar commented 3 years ago

Fixed (removed control characters from the offending document). Thanks.

jeffpar commented 3 years ago

Btw, I also removed Gemfile.lock from the repo (apparently it's a "best practice" to have the file checked in, but I just find it to be a nuisance when switching between host operating systems), so you'll probably need to run bundle update to recreate your own Gemfile.lock.