[Bug]: Create collections/_cupcakes folder when building my Jekyll site with CI/CD

Operating System

linux ruby:latest

Ruby Version


Jekyll Version


GitHub Pages Version


Expected Behavior

When collections/_cupcakes folder is added to _config.yml create custom folder on bundle exec jekyll build --verbose --trace aka jekyll build.

I ran into a troublesome bug, maybe I am doing something wrong here, but on my CI/CD, I kept getting an error and couldn’t pin point it down because the collections/_posts folder was being created without any trouble, but the _cupcakes folder and files kept populating the error:

bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)

<internal:dir>:98:in `open': No such file or directory @ dir_initialize - ./collections/_cupcakes/ (Errno::ENOENT)

I am able to manually create this folder with Ruby, but shouldn’t Jekyll do this?

Current Behavior

bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)

<internal:dir>:98:in `open': No such file or directory @ dir_initialize - ./collections/_cupcakes/ (Errno::ENOENT)

Config Code Sample

My _config.yml snippet:

# Collection configuration
# These collections will sort types of products and loop through that
# type to be displayed on a page. As an example, I have 10 "3D" items, all 10 items
# will be displayed when a category is selected on the product main index page.
collections_dir: collections

    output: true # true or false
    permalink: /products/:path/

Doing something like this manually has resolved the conflict, but maybe my _config.yml is funky?

      # manually create custom collection folders [bug: shouldn't Jekyll do this? https://github.com/jekyll/jekyll/issues/9193]
      if not Dir.exist?("./collections/_products")
        Jekyll.logger.info "the Jekyll products directory does not exist, let's create one".to_s.red
        Jekyll.logger.info "DIR DEBUG: The local ./collections/_products directory is created at: ./collections/_products/".to_s.yellow

your collection name is products? but you are saying cupcakes? which is it?

I’d remove the permalink just to see if anything changes.