Closed tkrunning closed 3 years ago
The issue seems to be with an empty data structure, rather than with the way in which you installed the plugin (i.e, putting the source in _config, rather than installing the gem).
Did you configure how to read the data (in _config.yml) and is the data correct (e.g, each record has the field specified in _config.yml)?
You can set debug: true in _config.yml (under the data you want to check) to have datapage-generator be more informative about what is causing the trouble (see https://github.com/avillafiorita/jekyll-datapage_gen#usage, the last field)
Hope it helps, let me know if it works.
-----Original Message----- From: Thomas K. Running notifications@github.com Reply-To: avillafiorita/jekyll-datapage_gen reply@reply.github.com To: avillafiorita/jekyll-datapage_gen jekyll-datapage_gen@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [avillafiorita/jekyll-datapage_gen] Doesn't seem to work with Jekyll 4.2.0 (#95) Date: Tue, 16 Feb 2021 05:15:48 -0800
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-datapage-generator-1.3.0/lib/jekyll-datapage-generator.rb:170:in block in generate': undefined method
each' for nil:NilClass (NoMethodError)
-- Adolfo Villafiorita http://ict4g.fbk.eu adolfo@ict4g.net - +39 349 6204514
For some reason, it started working again without throwing the error... Without me changing anything (just running bundle install
once more). It's possible that the issue was related to the jekyll-get-json
plugin, as the data being used by jekyll-datapage_gen
is being pulled by that plugin (it's not stored in the _data dir).
Thanks for getting back to me so quickly, and sorry for the false alarm!
Edit: somehow it seems Ruby got downgraded to 2.7 and that solved the issue.
Edit2: In case anyone else runs into this issue, it was indeed the jekyll-get-json
plugin that needed to be updated to 1.0.0
in order to work with Ruby 3.0.
With jekyll-datapage-generator installed I get the following error when running
jekyll s --trace
:Removing the plugin from
_config.yml
andGemfile
solves the issue, but then obviously I can't use the plugin...Any idea if this is a general compatibility issue or a local issue on my machine?