mmistakes / jekyll-theme-basically-basic

Your new Jekyll default theme.
https://mmistakes.github.io/jekyll-theme-basically-basic/
MIT License
861 stars 1.22k forks source link

Example not working out of the box #156

Open fkurz opened 2 years ago

fkurz commented 2 years ago

Environment

Expected behavior

The example in directory example/ should work out of the box after running bundle install and then bundle exec jekyll serve.

Steps to reproduce the behavior

gh repo clone mmistakes/jekyll-theme-basically-basic
cd jekyll-theme-basically-basic
bundle install
cd example
bundle exec jekyll serve

produces the following error stack trace

Cloning into 'jekyll-theme-basically-basic'...
remote: Enumerating objects: 1918, done.
remote: Total 1918 (delta 0), reused 0 (delta 0), pack-reused 1918
Receiving objects: 100% (1918/1918), 2.20 MiB | 2.24 MiB/s, done.
Resolving deltas: 100% (994/994), done.
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Fetching rake 13.0.6
Installing rake 13.0.6
Using public_suffix 4.0.6
Using rouge 3.27.0
Using safe_yaml 1.0.5
Using concurrent-ruby 1.1.9
Using jekyll-paginate 1.1.0
Using addressable 2.8.0
Using i18n 1.8.11
Using forwardable-extended 2.6.0
Using rb-fsevent 0.11.0
Using pathutil 0.16.2
Using liquid 4.0.3
Using mercenary 0.4.0
Using bundler 2.2.19
Using colorator 1.1.0
Using unicode-display_width 1.8.0
Using eventmachine 1.2.7
Using terminal-table 2.0.0
Using ffi 1.15.4
Using rexml 3.2.5
Using sassc 2.4.0
Using kramdown 2.3.1
Using rb-inotify 0.10.1
Using kramdown-parser-gfm 1.1.0
Using listen 3.7.0
Using http_parser.rb 0.8.0
Using jekyll-watch 2.2.1
Using em-websocket 0.5.3
Using jekyll-sass-converter 2.1.0
Using jekyll 4.2.1
Using jekyll-feed 0.15.1
Using jekyll-seo-tag 2.7.1
Using jekyll-sitemap 1.4.0
Using jekyll-theme-basically-basic 1.4.5 from source at `.`
Bundle complete! 3 Gemfile dependencies, 34 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Configuration file: /private/tmp/jekyll-theme-basically-basic/example/_config.yml
 Theme Config file: /private/tmp/jekyll-theme-basically-basic/_config.yml
            Source: /private/tmp/jekyll-theme-basically-basic/example
       Destination: /private/tmp/jekyll-theme-basically-basic/example/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
          Skipping: _posts/2010-10-25-post-future-date.md has a future date
       Jekyll Feed: Generating feed for posts
                    done in 1.276 seconds.
 Auto-regeneration: enabled for '/private/tmp/jekyll-theme-basically-basic/example'
                    ------------------------------------------------
      Jekyll 4.2.1   Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------
/Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:179:in `require_relative'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:179:in `setup'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:100:in `process'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `each'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/exe/jekyll:15:in `<top (required)>'
    from /Users/main/.rbenv/versions/3.0.1/bin/jekyll:23:in `load'
    from /Users/main/.rbenv/versions/3.0.1/bin/jekyll:23:in `<top (required)>'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `load'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:63:in `kernel_load'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/cli/exec.rb:28:in `run'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/cli.rb:474:in `exec'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/cli.rb:30:in `dispatch'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/cli.rb:24:in `start'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/exe/bundle:49:in `block in <top (required)>'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    from /Users/main/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.19/exe/bundle:37:in `<top (required)>'
    from /Users/main/.rbenv/versions/3.0.1/bin/bundle:23:in `load'
    from /Users/main/.rbenv/versions/3.0.1/bin/bundle:23:in `<main>'

Suggested fix

Seems like the webrick gem was not included in the Gemfile.

# Gemfile

gem "webrick"
penevl commented 2 years ago

It says it in the Jekyll docs that you may have to do bundle add webrick if you are using a ruby version older than 3.0.0 since webrick got removed.