xmonad/xmonad-web

`make serve` fails on ruby 3.0

Closed this issue · 4 comments

This is not an issue with this repo per se, but it is perhaps valuable to write it down somewhere so people can find this information.

With ruby 3.0, make serve fails with something like

TypeError: no implicit conversion of Hash into Integer

This seems to be caused by pathutil ignoring a deprecation which is now actually a compilation error.

Further, webrick seems to not be bundle anymore, which means it has to be added to the Gemfile.

How to fix it locally

  1. Manually apply the patch from envygeeks/pathutil#5 to the pathutil dir:

    $ pwd
    /home/slot/repos/xmonad/xmonad-web/.bundle/xmonad-gems/ruby/3.0.0/gems/pathutil-0.16.2
    $ patch -p1 < diff.patch

    there might be some warnings about missing tests, but this can safely be ignored.

  2. As pointed out in jekyll/jekyll#8523, add

    gem "webrick", "~> 1.7"

    to the gemfile or install webrick directly with bundle add webrick.

  3. make serve should now work.

Do we want to keep eb65e5d around?

Absolutely no idea, but also: why is it important? Our Makefile now works with both 2.7 and 3.0, but still prefers 2.7, and we likely no longer need that preference.

Mh, you're probably right. Let's just revert that then.