Skip to content

Trouble in Adding Gem of Jekyll with Bundler #9821

Open
@chaoyang2013

Description

@chaoyang2013

Hi friends.

These days I'm learning Jekyll. I'm following the instructions on Jekyll's official site https://jekyllrb.com/.

Now I have already successfully installed Ruby and Jekyll in my system, and I also managed to go through the Quickstart in https://jekyllrb.com/docs/.

My operating system is Windows 10. Ruby version is 3.3.8. Jekyll version is 4.4.1.

However, I have trouble when I try the tutorial in this page https://jekyllrb.com/tutorials/using-jekyll-with-bundler/. In this tutorial, we can add gems locally rather than the default global gem installation directory. I think it's a great function of gem, so I want to learn this.

I have done the configuration of the Bundler install path: <bundle config set --local path 'vendor/bundle'>.

When I run the succeeding step "bundle add jekyll", the installation stucks.

The command window returns:

An error occurred while installing http_parser.rb (0.8.0), and Bundler cannot continue.

In Gemfile:
jekyll was resolved to 4.4.1, which depends on
em-websocket was resolved to 0.5.3, which depends on
http_parser.rb

However, if I check the sub file “vendor”, I can find the gem of http_parser.rb-0.8.0.

If I further try the command "jekyll build", it returns

C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.6.8/lib/bundler/definition.rb:691:in `materialize': Could not find jekyll-4.4.1, em-websocket-0.5.3, jekyll-sass-converter-3.1.0, http_parser.rb-0.8.0, sass-embedded-1.87.0-x64-mingw-ucrt, google-protobuf-4.30.2-x64-mingw-ucrt, bigdecimal-3.1.9 in locally installed gems (Bundler::GemNotFound)

    from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.6.8/lib/bundler/definition.rb:237:in `specs'
    from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.6.8/lib/bundler/definition.rb:304:in `specs_for'
    from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.6.8/lib/bundler/runtime.rb:18:in `setup'
    from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.6.8/lib/bundler.rb:167:in `setup'
    from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-4.4.1/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
    from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-4.4.1/exe/jekyll:11:in `<top (required)>'
    from C:/Ruby33-x64/bin/jekyll:36:in `load'
    from C:/Ruby33-x64/bin/jekyll:36:in `<main>'

So could any friends give me some suggestions where the bug lies? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions