Jekyll 3.9.0 |错误:没有隐含的哈希转换为integer/var/lib/gems/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:In阅读':
更新到Ubuntu 22.04后,我与Jekyll失败了。
Bundle exec jekyll服务
创建此错误:
...
done in 8.248 seconds.
jekyll 3.9.0 | Error: no implicit conversion of Hash into Integer
/var/lib/gems/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)
from /var/lib/gems/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:75:in `proc_version'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:40:in `bash_on_windows?'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:77:in `watch'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:43:in `process'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `each'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `start'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /var/lib/gems/3.0.0/gems/jekyll-3.9.0/exe/jekyll:15:in `<top (required)>'
from /usr/local/bin/jekyll:25:in `load'
from /usr/local/bin/jekyll:25:in `<top (required)>'
from /var/lib/gems/3.0.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'
from /var/lib/gems/3.0.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'
...
from /var/lib/gems/3.0.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'
from /var/lib/gems/3.0.0/gems/bundler-2.3.15/exe/bundle:48:in `block in <top (required)>'
from /var/lib/gems/3.0.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
from /var/lib/gems/3.0.0/gems/bundler-2.3.15/exe/bundle:36:in `<top (required)>'
from /usr/bin/bundle:25:in `load'
from /usr/bin/bundle:25:in `<main>'
如何解决此问题?
jekyll repo: https://github.com/schmidb/turtletrafo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Ruby 3可能是问题,请参见:
第二个链接建议降级到Ruby/Bundler 2.7
还有另一个有趣的信息在此线程中:
您的gemfile.lock说jekyll 3.9.2,所以问题现在应该消失了。
Ruby 3 may be the problem, see:
The second link suggests downgrading to Ruby/Bundler 2.7
There is another interesting info in this thread:
Your Gemfile.lock says Jekyll 3.9.2 so the issue should be gone now.
更新
github页面
gem:上面假设安装了邦德勒(请参阅 github 页面 gem: -a-github页面site-with-jekyll/testing-your-github页面site-locally-with-jekyll#更新the-github-pages-gem“ rel =“ nofollow noreferrer”>在这里)。
This got fixed for me after updating the
github-pages
gem:The above assumes Bundler is installed (see here).