inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.13k stars 101 forks source link

Jekyll Scholar on macOS 10.13.6: Tried to create Proc object without a block #357

Open mabalenk opened 1 year ago

mabalenk commented 1 year ago

Hello,

I need help please. I'm trying to run Jekyll on a relatively old macOS (High Sierra v10.13.6). I'm unable to build and serve my website locally. The bundle exec jekyll serve command crashes with the following error:

Liquid Exception: tried to create Proc object without a block in perl.md
jekyll 3.9.3 | Error:  tried to create Proc object without a block
/Users/mabalenk/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:150:in `new': tried to create Proc object without a block (ArgumentError)

I already downgraded my Jekyll to v3.9.3 and my Ruby to v3.1.4. I also specified jekyll-scholar v5.16.0 in my Gemfile. However, the code still crashes. Would you be able to tell me, what is the maximum version of jekyll-scholar that will be supported by Jekyll v3.9.3? Thank you and have a great day ahead!

inukshuk commented 1 year ago

Why are you trying to make this run using old Gems? I don't think the old macOS version should give you any problems as long as you've installed a sufficiently recent version of Ruby. The error message above is certainly caused by some combination of running the Gem with an incompatible Ruby version. So if possible, I'd try to install the latest versions of jekyll and jekyll-scholar.

If there's some other reason why you have to stick with an older version of either of the two that's another matter of course. To answer your question it looks like this commit broke with jekyll 3.x. It was tagged 7.1.3 so I'd guess that the versions before that should work with jekyll 3.9.

mabalenk commented 1 year ago

I tried running the latest and greatest Ruby, Jekyll and Jekyll-Scholar, but serving the website locally failed with the 'sass' gem error: Jekyll::Converters::Scss:

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/main.scss':
                    end of file reached
bundler: failed to load command: jekyll (/Users/mabalenk/.rbenv/versions/3.2.2/bin/jekyll)
/Users/mabalenk/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/sass-embedded-1.68.0-x86_64-darwin/lib/sass/embedded/varint.rb:20:in `readbyte': end of file reached (EOFError)

I posted more details on the Jekyll forum. Maybe you know how to solve it? As a workaround I decided to downgrade Jekyll to 3.9.3. This brought a cascade of changes to Ruby and Jekyll-Scholar.

I will try to follow your suggestion. Thank you for your help!

mabalenk commented 1 year ago

I just tried using v7.1.2 of Jekyll-Scholar. It depends on Jekyll 4 and therefore fails:

Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Could not find compatible versions

Because jekyll-scholar >= 6.0.0 depends on jekyll ~> 4.0
  and Gemfile depends on jekyll = 3.9.3,
  jekyll-scholar >= 6.0.0 cannot be used.
So, because Gemfile depends on jekyll-scholar = 7.1.2,
  version solving has failed.

I need the latest version compatible with Jekyll v3.9.3. Can you please suggest one?

inukshuk commented 1 year ago

Versions 5.x should be good.

However, I'd really stay up on the latest Gem versions and instead figure out if there's an alternative sass/scss Gem you can use. Judging by the error message you posted the native code used by newer sass versions may not work on your OS so maybe that's why the conversion fails (or there's an sass/scss issue in your stylesheet).