Skip to content

make serve fails on ruby 3.0 #37

@slotThe

Description

@slotThe

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 Fix ruby keyword parameter deprecation warnings 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 serve fails on Ruby 3.0 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions