Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jekyll

bundle

after update to Ubuntu 22.04 I am failing with Jekyll.

bundle exec jekyll serve creates this error:

...
                  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>'

Any advice how to fix this?

jekyll repo: https://github.com/schmidb/TurtleTrafo

like image 353
Markus Schmidberger Avatar asked Oct 17 '25 02:10

Markus Schmidberger


1 Answers

Ruby 3 may be the problem, see:

  • https://talk.jekyllrb.com/t/error-no-implicit-conversion-of-hash-into-integer/5890/7
  • https://github.com/envygeeks/pathutil/issues/4

The second link suggests downgrading to Ruby/Bundler 2.7

There is another interesting info in this thread:

on 26 Apr Jekyll v3.9.2 finally removed Jekyll's main dependency on pathutil. Now that Github Pages updated to that version of Jekyll (see https://github.com/github/pages-gem/pull/833), this issue shouldn't affect Github pages or Jekyll anymore.

Your Gemfile.lock says Jekyll 3.9.2 so the issue should be gone now.

like image 149
Christian Avatar answered Oct 19 '25 12:10

Christian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!