middleman-blog
middleman-blog copied to clipboard
YAML error on Ruby 3.1.0
Expected behaviour
Everything works with no issues.
Actual behaviour
I'm seeing warnings about the date:
key when parsing the blog posts:
YAML Exception parsing [PROJECT_PATH]/boon-blog/source/articles/2014-09-23-setting-up-a-middleman-blog.html.md: Tried to load unspecified class: Date
The frontmatter looks like:
---
title: Setting up a Middleman Blog
date: 2014-09-23
tags: technical, blogging, middleman
authors: Robert Fletcher
---
For some reason, the rendered result of this is that the blog posts show up without their titles.
Steps to reproduce the problem
You can run middleman serve
on this branch.
Additional information
- Ruby version: 3.1.0
- Middleman version: 4.4.2
- Middleman Blog version: 4.0.3
- OS version: x86_64-linux
I would recommend keeping Middleman 4.x projects on Ruby 2.x
There are some PRs to enable Ruby 3.1 support, but those are on the Middleman 5.x branch and unlikely to be backported.
@tdreyno I see, do you know when 5.x will be released?
Looking a lot like never, but the master branch is up to date and being updated to current releases just in case.
@tdreyno Should I be making plans to move to a different static site generator?
I was able to get around this by adding the time to the date.
There is no reason to be using Ruby 3.x with Middleman. I suggest utilizing rvm or Docker to allow Middleman v4 to continue to operate in the environment it expects.
@mockdeep @puyo @lyc4n We finally pushed some fixes in v4 branch (now "main" branch again) and now it works fine with all these Ruby versions (From 2.5 to 3.3): https://github.com/middleman/middleman/blob/1d1e7528d16dad59a15e988ea5aed171c79a7736/.github/workflows/ci.yml#L12
So I think you can close this issue 🙏🏼