You are not logged in.

#1 2021-04-15 19:16:30

zuntik
Member
Registered: 2017-08-11
Posts: 37

[Solved] "bundle exec jekyll serve" crashes

Hi. I'm trying to follow the github-pages guide for jekyll. I'm not having much luck. because it keeps crashing when I run:

$ bundle exec jekyll serve     
Configuration file: /home/user/Documents/blog/docs/_config.yml
            Source: /home/user/Documents/blog/docs
       Destination: /home/user/Documents/blog/docs/_site
Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
                    done in 0.223 seconds.
jekyll 3.9.0 | Error:  no implicit conversion of Hash into Integer
/home/user/.local/share/gem/ruby/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)
        from /home/user/.local/share/gem/ruby/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:75:in `proc_version'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-3.9.0/lib/jekyll/utils/platforms.rb:40:in `bash_on_windows?'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:77:in `watch'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:43:in `process'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start'

I installed bundle and jekyll the [reccomended way](https://wiki.archlinux.org/index.php/Ruby#RubyGems)

The version of jekyll available in my path is 4.2.0. I discovered this by running `jekyll -v`. But I had to run this outside of the project directory. if I run `jekyll -v`in the poject directory it gives the following output

$ jekyll -v
/home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/runtime.rb:302:in `check_for_activated_spec!': You have already activated i18n 1.8.10, but your Gemfile requires i18n 0.9.5. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
        from /home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/runtime.rb:31:in `block in setup'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/spec_set.rb:152:in `each'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/spec_set.rb:152:in `each'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/runtime.rb:26:in `map'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler/runtime.rb:26:in `setup'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.16/lib/bundler.rb:148:in `setup'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
        from /home/user/.local/share/gem/ruby/3.0.0/gems/jekyll-4.2.0/exe/jekyll:11:in `<top (required)>'
        from /home/user/.local/share/gem/ruby/3.0.0/bin/jekyll:23:in `load'
        from /home/user/.local/share/gem/ruby/3.0.0/bin/jekyll:23:in `<main>'

Any ideas why this is?

Thank you

Edit: I see the problem: jekyll is currently not compatible with ruby 3.0.0, only ruby 2.7.3. Therefore, I installed ruby 2.7.3 with rbenv

Last edited by zuntik (2021-04-16 12:12:34)

Offline

#2 2021-04-15 21:13:54

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] "bundle exec jekyll serve" crashes

The time I did a successful GitHub jekyll site, I followed the Official Jekyll site as it was more accurate and clearer. My suspicion is your issues are related to initialization.
The Arch link you quoted is a better guide for RubyGems but if you specifically want Jekyll, then I recommend undoing everything you have done so far and head to the Jekyll site I've quoted. It is much better documented there. It even has a Step-By-Step Tutorial.

EDIT: I assume you've setup your github.io?

Last edited by d_fajardo (2021-04-15 21:27:07)

Offline

#3 2021-04-15 22:13:08

zuntik
Member
Registered: 2017-08-11
Posts: 37

Re: [Solved] "bundle exec jekyll serve" crashes

Thank you for the replay d_fajardo,

I've kept ruby installed. I deleted the $GEM_HOME dir. and Followed the installation steps for Ubuntu here.
Then I ran

gem install jekyll bundler
jekyll new myblog
cd myblog
bundle exec jekyll serve

but get the same crash...

Offline

#4 2021-04-16 19:18:53

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] "bundle exec jekyll serve" crashes

Offline

#5 2021-06-05 16:33:18

LemurianKsatraYamaII
Member
Registered: 2021-06-05
Posts: 4

Re: [Solved] "bundle exec jekyll serve" crashes

Ruby 3.0 deprecated using the last argument as keyword parameters a double splat ** has to be added before the variable for the behaviour to be supported.

But have no fear though the maintainer  of the gem might be asleep its fairly straightforward to amend locally the relevant patch is found here

Offline

#6 2021-09-10 22:38:22

albinou
Member
From: Paris, France
Registered: 2012-04-08
Posts: 7

Re: [Solved] "bundle exec jekyll serve" crashes

Another solution that looks much easier to me than rbenv is to install ruby2.7:

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

Cheers!

Offline

#7 2022-04-13 03:01:48

keeks20
Member
Registered: 2022-04-13
Posts: 1

Re: [Solved] "bundle exec jekyll serve" crashes

Hi @albinou,

I attempted your fix but I am still getting issues, I am assuming this is because bundle is still trying to user ruby 3.0 that is installed on my system for the Gem Home (running bundle-2.7 env is still showing ruby/3.0.0)

here is the error I am recieving when trying to run bundle-2.7 exec jekyll serve

    .local/share/gem/ruby/3.0.0/gems/pathutil-0.16.2/lib/pathutil.rb:502:in `read': no implicit conversion of Hash into Integer (TypeError)

Any help is appreciated, I am very much still a newbie.

Offline

#8 2022-04-13 11:13:47

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] "bundle exec jekyll serve" crashes

@keeks20
The issues here are really old and already solved. Please open a new thread with your actual problems and solutions you've tried. Otherwise the post will just be ignored by forum readers since it's already been marked 'Solved' by the OP. Also you might get flagged for necro-bumping by the mods.

EDIT: By the sound of it your problem is with Gem rather than Jekyll.

Last edited by d_fajardo (2022-04-13 11:19:02)

Offline

#9 2022-04-13 12:56:03

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [Solved] "bundle exec jekyll serve" crashes

d_fajardo wrote:

@keeks20
The issues here are really old and already solved. Please open a new thread with your actual problems and solutions you've tried.

Closing this old solved thread.

Offline

Board footer

Powered by FluxBB