nielsenramon / chalk

Chalk is a high quality, completely customizable, performant and 100% free Jekyll blog theme.
http://chalk.nielsenramon.com
MIT License
1.23k stars 444 forks source link

[Information] Running Chalk on Windows #220

Open ghost opened 3 years ago

ghost commented 3 years ago

Hey for everyone having problems with Chalk on Windows.

First make sure you have Msys64 installed or use the one that comes with Ruby Installer with DevKit. I recommend using rubyinstaller-devkit-2.7.4-1. Ruby 3.0 might cause you issues when you running your npm run local or publish.

Next is to make sure you edit packages.json so it has "setup": "sh bin/setup" and "publish": "sh bin/deploy". Sh is needed so you can run your scripts via git bash environment. Also, when you first install Ruby, you might get 'bundler command not found'.

Make sure you use gem install bundler without "--conservative" in setup file. Last but not least, use gitbash terminal. Using powershell or cmd will lead you to some issues with "find" command during deployment and development.

image

That's it, after some days of research I can finally build my first blog. Thanks @nielsenramon ! If anyone ever stumble with some issues on Windows do not hesitate to ping me here.

Cheers.

sgbaird commented 2 years ago
(parables) PS C:\Users\sterg\Documents\GitHub\sgbaird\parables> npm run local

> local
> bundle exec jekyll serve --drafts

C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll/converters/smartypants.rb:3:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:13:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:13:in `block in require_all'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:12:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:12:in `require_all'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:194:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/exe/jekyll:8:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/exe/jekyll:8:in `<top (required)>'
        from C:/Ruby31-x64/bin/jekyll:25:in `load'
        from C:/Ruby31-x64/bin/jekyll:25:in `<main>'
ghost commented 2 years ago
(parables) PS C:\Users\sterg\Documents\GitHub\sgbaird\parables> npm run local

> local
> bundle exec jekyll serve --drafts

C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll/converters/smartypants.rb:3:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:13:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:13:in `block in require_all'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:12:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:12:in `require_all'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/lib/jekyll.rb:194:in `<top (required)>'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/exe/jekyll:8:in `require'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-3.8.6/exe/jekyll:8:in `<top (required)>'
        from C:/Ruby31-x64/bin/jekyll:25:in `load'
        from C:/Ruby31-x64/bin/jekyll:25:in `<main>'

image

Looks like you have ruby 3.1 installed.

sgbaird commented 2 years ago

Ah😅case in point I guess. Got a little carried away with exploring multiple options and somehow missed/forgot this. Thanks @wobes1 !