minicomp / wax

Jekyll based framework for minimal exhibitions with IIIF 🐝
https://minicomp.github.io/wax/
MIT License
160 stars 84 forks source link

Add webrick to Gemfile? #106

Closed bmschmidt closed 3 years ago

bmschmidt commented 3 years ago

The website says to run bundle exec jekyll serve after the wax tasks, but that command didn't work for me. I was able to get it to run after adding gem 'webrick', '>=1.7.0' to the gemfile.

Trying to get this running I learned my Ruby installation is a mess, so maybe it's just me? But there seem to be a recently slate of issues with the same problem. https://github.com/jekyll/jekyll/issues/8523

base) ➜  a-files git:(main) ✗ ruby -v
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin19]
(base) ➜  a-files git:(main) ✗ jekyll -v
jekyll 4.2.0

trace for searchability

                    ------------------------------------------------
      Jekyll 4.2.0   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
/Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `require_relative'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `setup'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:100:in `process'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
    from /Users/bschmidt/.gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
    from /Users/bschmidt/.gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
    from /Users/bschmidt/.gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
    from /Users/bschmidt/.gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
    from /Users/bschmidt/.gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
    from /Users/bschmidt/.gem/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
    from /Users/bschmidt/.gem/bin/jekyll:23:in `load'
    from /Users/bschmidt/.gem/bin/jekyll:23:in `<top (required)>'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/exe/bundle:49:in `block in <top (required)>'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
    from /usr/local/Cellar/ruby/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/exe/bundle:37:in `<top (required)>'
    from /usr/local/opt/ruby/bin/bundle:23:in `load'
    from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
mnyrop commented 3 years ago

@bmschmidt ruby 3.0 isn't considered stable so we don't support it yet. if you have the same problem after rolling back to ruby >= 2.4 < 3.0 let me know and I can reopen this issue. I'd highly recommend RVM for this purpose

bmschmidt commented 3 years ago

OK. FYI both homebrew and the ruby home page are steering me to 3.0.1 as the live release right now? Is it like a Python 2/3 situation where everyone's decided to wait five years before listening to them? With this change it seems to work, but if anything further breaks I'll try RVM to downgrade.

mnyrop commented 3 years ago

@bmschmidt that's good to know. >= 3.0 has breaking changes (hence the major point semantic version change), so it'll just take a bit for gem maintainers to test, update & accommodate. I'll likely wait for Jekyll itself to handle this before recommending a Ruby upgrade to Wax users, but this issue stub should help folks find your quick-fix in the meantime.

fwiw, i wouldn't anticipate a python-style timeframe for 3.0 adoption... 🤞🏻