YAML problem in default configuration

16 views
Skip to first unread message

BartR

unread,
Jan 17, 2022, 12:03:17 PM1/17/22
to nanoc

Hello!

I've been an occasional Nanoc user for several years. I used to manage two simple websites, and the updates were so infrequent and straightforward that changes in nanoc did not affect me much. However, recently I had to upgrade my computer and reinstall nanoc. The current version does not seem to process yaml and chokes on the default example files for some strange reason. I am sure there must be some simple and very obvious solution/explanation, but since I have been using nano on an elementary level only, I have no idea how to fix it...

To cut tong story short: after installing nanoc, and compiling the example site, I receive the following error:

Nanoc::DataSources::Filesystem::Errors::UnparseableMetadata: Could not parse metadata for content/index.html: unknown keyword: :permitted_classes

The index.html file can be correctly processed ONLY after removing the "title:" section.

My simple question is: what are the minimal configuration and prerequisites that should allow the current version of nanoc to process the files correctly?. I use :

  • Nanoc 4.12.4
  • ruby 3.0.0 (2020-12-25) on x86_64-darwin20 with RubyGems 3.2.3.
Bart

Denis Defreyne

unread,
Jan 17, 2022, 2:30:35 PM1/17/22
to noreply-spamdigest
Hi Bart,

You’ll need a newer version of `psych`. Stick it in your Gemfile:

    gem 'psych', '~> 4.0'

… and run `bundle install`. Nanoc should now work correctly.

Psych is Ruby’s YAML parser. I believe Ruby 3.1 already comes with the newest version, but on older Rubies (like 3.0), it needs an update.

This was an oversight on my part, as I did not properly specify the correct `psych` dependency in Nanoc 4.12.4. I’ll cut a new release with the correct dependencies soon.

Best,

Denis Defreyne
[dəˈni] • pronouns: he/him

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

BartR

unread,
Jan 17, 2022, 9:15:09 PM1/17/22
to nanoc
Thank you for the incredibly fast response! In the meantime, I temporarily downgraded to version 4.11.23 and successfully updated the content of the websites I needed to fix. :-)

I will return to Nanoc 4.12.4 now and install the psych parser.

Thanks again!

Bart

Denis Defreyne

unread,
Jan 22, 2022, 4:46:17 AM1/22/22
to noreply-spamdigest
Hey there,

I released Nanoc 4.12.5 which will work with the default YAML (Psych) that comes with Ruby 2.6+.

Best,

Denis Defreyne
[dəˈni] • pronouns: he/him



Reply all
Reply to author
Forward
0 new messages