Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby-3.0 - no error bundle update, but now can't serve #822

Closed
ahmadrasyidsalim opened this issue Apr 5, 2021 · 5 comments
Closed

ruby-3.0 - no error bundle update, but now can't serve #822

ahmadrasyidsalim opened this issue Apr 5, 2021 · 5 comments

Comments

@ahmadrasyidsalim
Copy link

$ bundle exec jekyll serve
Configuration file: /home/ahmadrasyidsalim/choosealicense.com/_config.yml
            Source: /home/ahmadrasyidsalim/choosealicense.com
       Destination: /home/ahmadrasyidsalim/choosealicense.com/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 2.406 seconds.
jekyll 3.9.0 | Error:  no implicit conversion of Hash into Integer
/home/ahmadrasyidsalim/.rvm/gems/ruby-3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)
@mlinksva
Copy link
Contributor

mlinksva commented Apr 5, 2021

I can't replicate that, but I do get jekyll/jekyll#8523 which I'll make a PR to fix.

@ahmadrasyidsalim
Copy link
Author

Even after webrick is installed, I still got the same

$ bundle exec jekyll serve
Configuration file: /home/ahmadrasyidsalim/choosealicense.com/_config.yml
            Source: /home/ahmadrasyidsalim/choosealicense.com
       Destination: /home/ahmadrasyidsalim/choosealicense.com/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 2.467 seconds.
jekyll 3.9.0 | Error:  no implicit conversion of Hash into Integer
/home/ahmadrasyidsalim/.rvm/gems/ruby-3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)

@mlinksva
Copy link
Contributor

mlinksva commented Apr 8, 2021

Ok, I was able to reproduce on Debian. Someone else had the same problem. Full stack trace below. The cause isn't obvious to me, but presumably a jekyll issue that can't be fixed in this repo.

jekyll 3.9.0 | Error:  no implicit conversion of Hash into Integer
/home/mlinksva/.rbenv/versions/3.0.1/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/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:75:in `proc_version'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:40:in `bash_on_windows?'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:77:in `watch'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:43:in `process'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `each'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `start'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/jekyll-3.9.0/exe/jekyll:15:in `<top (required)>'
        from /home/mlinksva/.rbenv/versions/3.0.1/bin/jekyll:23:in `load'
        from /home/mlinksva/.rbenv/versions/3.0.1/bin/jekyll:23:in `<top (required)>'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/cli.rb:494:in `exec'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:49:in `block in <top (required)>'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
        from /home/mlinksva/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/bundler-2.2.15/libexec/bundle:37:in `<top (required)>'
        from /home/mlinksva/.rbenv/versions/3.0.1/bin/bundle:23:in `load'
        from /home/mlinksva/.rbenv/versions/3.0.1/bin/bundle:23:in `<main>'

@mlinksva
Copy link
Contributor

mlinksva commented Apr 8, 2021

Ah, it's a common (and planned) ruby 3 issue, should've spotted that. The fix is in pathutil at envygeeks/pathutil#5 so this will persist (on platforms where pathutil uses that particular code) until that gem gets updated.

@mlinksva
Copy link
Contributor

The version of Jekyll being used by GitHub Pages no longer uses pathutil envygeeks/pathutil#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@mlinksva @ahmadrasyidsalim and others