'pathutil' ruby gem 与 jekyll (v3.9.0) 和 ruby (v3.0.0) 兼容吗?

Is the 'pathutil' ruby gem compatible with jekyll (v3.9.0) and ruby (v3.0.0)?

我的问题: 我有一个基于 jekyll 的静态网站;在 运行 bundle exec jekyll serve 之后(按照 jekyll 文档的指示)我得到了下面的堆栈跟踪。我在堆栈跟踪中为该博客 post 文件创建的降价文件完全是标准语法。我用谷歌搜索了具体的错误,并得到了 posts 的类似错误,但没有解决我的问题。我还搜索了 jekyll 文档,看看是否存在不兼容问题。

           Writing: /home/REDACTED/projects/thomdlee.github.io/_site/jekyll/update/2020/12/28/currently-in-maintenance.html
                    done in 0.356 seconds.
jekyll 3.9.0 | Error:  no implicit conversion of Hash into Integer
/home/REDACTED/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)
        from /home/REDACTED/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read'

我的所有代码都可以在 github 上找到:https://github.com/thomdlee/thomdlee.github.io

我的环境:

我遇到了同样的问题,但在 MacOS 环境中。

为了修复它,我在项目文件夹中运行执行了以下命令:

bundler update

似乎 pathutil 有弃用问题 Link

我遇到了同样的问题,但将 Ruby 降级为 2。7.x 解决了这个问题。

唯一的解决办法仍然是降级。

在 Arch 上 Linux 你可以做到

sudo pacman -S ruby2.7
cd /PATH/TO/YOUR/JEKYLL/PROJECT
bundle-2.7 install
bundle-2.7 exec jekyll serve

来源:https://bbs.archlinux.org/viewtopic.php?id=265534