# Jekyll 4.2.2 collections and folders within \_collection

**URL:** <https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158>\
**Category:** Help\
**Created:** [March 29, 2022, 1:11am UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158 "2022-03-29T01:11:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhhepting](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dhhepting](https://talk.jekyllrb.com/u/dhhepting)\
**Post date:** [March 29, 2022, 1:11am UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158/1 "2022-03-29T01:11:34Z")

</div>

Hello,

I’ve just updated to macOS 12.3, the latest homebrew, ruby 3.0.2, and so forth… I set up a site a few years ago where I had a \_collection that contained a sub folder that contained most of the collection’s items. The collection was setup with output true. In my current setup, this sub folder seemed to break my site because when I put all the collection items directly into the \_collection folder, the site builds successfully. Is my analysis correct or are some issues still remaining?

This is the error message that I was receiving:

```auto
bundler: failed to load command: jekyll (/Users/hepting/Sites/dhhepting.github.io/vendor/bundle/ruby/3.0.0/bin/jekyll) 
/Users/hepting/.rbenv/versions/3.0.2/lib/ruby/3.0.0/fileutils.rb:1466:in unlink, Operation not permitted @ apply2files - /Users/hepting/Sites/dhhepting.github.io/_site/research/works (Errno::EPERM)

```

and here is how I described the “works” collection in my \_config.yml file:

```auto
collections:
  works:
    output: true
    permalink: /research/:collection/:title:output_ext

```

Best regards,  
Daryl

---

<div class="post-metadata">

**Author:** ![Koos](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Koos](https://talk.jekyllrb.com/u/Koos)\
**Post date:** [March 30, 2022, 7:02pm UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158/2 "2022-03-30T19:02:28Z")

</div>

That error messages doesn’t really explain it to me 😕

I have a folder structure like this for my collections:

```auto
content
  |——_de
  | |——pages
  | |——posts
  |——_en
     |——pages
     |——posts

```

The collections are `_de` and `_en`.  
My `_config.yml`:

```auto
collections_dir: content
collections:
  de:
    output: true
    permalink: /:collection/:slug
  en:
    output: true
    permalink: /:collection/:slug

```

This works fine on macOS 12.3. I have to say I downgraded to ruby 2.7.3 last summer because Forestry didn’t support V3 yet.

---

<div class="post-metadata">

**Author:** ![dhhepting](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dhhepting](https://talk.jekyllrb.com/u/dhhepting)\
**Post date:** [April 13, 2022, 8:09pm UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158/3 "2022-04-13T20:09:19Z")

</div>

Thanks for your example. A difference may be that I am not using a `collections_dir`?

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [April 13, 2022, 9:03pm UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158/4 "2022-04-13T21:03:33Z")

</div>

Rather than posting that line with the error, can you please share the entire output when you attempt to build the Jekyll site? Also, if you have the code up on a public repo, it would be great if you share that.

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [April 13, 2022, 9:50pm UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158/5 "2022-04-13T21:50:01Z")

</div>

Ignore my last request. I figured out your GitHub repo from the URL 🙂

When I build your site, the error points to the following file:

```auto
dhhepting.github.io/_data/teaching/CS-280/202210/plan.yml

```

The error looks something like this:

```auto
/dhhepting.github.io/_data/teaching/CS-280/202210/plan.yml): did not find the expected key while parsing a block mapping at line 347 column 5

```

The error message says the mapping issue occurs at line 347, but it is line 348 where you have the problem.

Your code looks like this:

```auto
15:
  BOK:
  - kaku:
    outcomes:
    topics:
  date: Tue-08-Mar-2022
  theme: Truth
  today:
    Administration:
    -desc: Happy Tuesday
    - desc: Attendance

```

Take a look under line 347, where it says `Administration:` and you will see line 348 that looks like this:

```auto
-desc: Happy Tuesday

```

Add a space after the `-` like this:

```auto
- desc: Happy Tuesday

```

And now your Jekyll site will build! **But** , you will encounter one other issue if you do not fix it first. Since you last worked with Jekyll, Ruby removed a core product called webrick and you need that for Jekyll. Before you do anything else, run:

```auto
bundle add webrick

```

For good measure, type:

```auto
bundle install
bundle update

```

Then, fix the YML file issue, and your site should build.

---

<div class="post-metadata">

**Author:** ![dhhepting](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@dhhepting](https://talk.jekyllrb.com/u/dhhepting)\
**Post date:** [April 13, 2022, 11:17pm UTC](https://talk.jekyllrb.com/t/jekyll-4-2-2-collections-and-folders-within-collection/7158/6 "2022-04-13T23:17:23Z")

</div>

Thanks for your followup. I haven’t updated my github repo in a while because I have changed my workflow. Based on your first post, I had intended to update the repo and restore the configuration that was giving me the error. I’ll post again when I have the error condition restored 🙂
