inukshuk / jekyll-scholar

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

Liquid Exception: tried to create a Proc object without a block #327

Closed grantwforsythe closed 3 years ago

grantwforsythe commented 3 years ago

I am running into an issue when I try to build my Jekyll site locally. The error message is as follows:

Liquid Exception: No such file or directory @ rb_sysopen - C:/Users/grant/Desktop/Repos/www/./_bibliography/references.bib in C:/Users/grant/Desktop/Repos/www/_posts/2021-03-26-post-title.md
jekyll 3.9.0 | Error:  No such file or directory @ rb_sysopen - C:/Users/grant/Desktop/Repos/www/./_bibliography/references.bib
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bibtex-ruby-4.4.7/lib/bibtex/bibliography.rb:150:in `new': tried to create Proc object without a block (ArgumentError)

Could this be the result of a version conflict with some plugins?

The source code can be found here.

inukshuk commented 3 years ago

Yes, you need to update your locally installed Gems.

grantwforsythe commented 3 years ago

Yes, you need to update your locally installed Gems.

I used bundle update to update the gems locally, but it's still throwing me the same error.

inukshuk commented 3 years ago

Can you confirm that you're on jekyll-scholar 6.8.1 and bibtex-ruby 6.0.0 or 5.1.7? (bundle update may not necessarily update to the latest versions, depending on what you have specified in the Gemfile)

grantwforsythe commented 3 years ago

It appears I was not. At the time, I was using bibtex-ruby 4.47 and jekyll-scholar 5.16.0.

I since have installed the correct versions with gem install. Do I have to specify the exact versions within the Gemfile and run bundle update as well?

In the Gemfile, I have:

gem "jekyll-scholar", "~> 6.8.1"
gem "bibtex-ruby", "~> 5.1.7"

When I now run bundle update I get,

Fetching gem metadata from https://rubygems.org/...........
Could not find gem 'bibtex-ruby (~> 5.1.7)' in rubygems repository
https://rubygems.org/ or installed locally.
The source contains the following versions of 'bibtex-ruby': 1.0.0, 1.1.0,
1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6,
1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.3.12, 2.0.0pre1, 2.0.0, 2.0.1, 2.0.2,
2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.12, 2.1.0,
2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 3.0.0,
3.0.1, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 4.0.0, 4.0.1, 4.0.2,
4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9, 4.0.10, 4.0.11, 4.0.12, 4.0.13,
4.0.14, 4.0.15, 4.0.16, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.3.0, 4.4.0, 4.4.1, 4.4.2,
4.4.3, 4.4.4, 4.4.5, 4.4.6, 4.4.7, 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.1.3,
5.1.4, 5.1.5, 5.1.6, 6.0.0

But when I select version 6.0.0. I get the following error

Bundler could not find compatible versions for gem "bibtex-ruby":
  In Gemfile:
    bibtex-ruby (~> 6.0.0)

    jekyll-scholar (~> 6.8.1) was resolved to 6.8.1, which depends on
      bibtex-ruby (~> 5.0)
inukshuk commented 3 years ago

My apologies, I guess we never released 5.1.7! Anyway, I pushed a new jekyll-scholar version that depends on bibtex-ruby 6.0 or later so you should be able to update now.

grantwforsythe commented 3 years ago

Yes, that has resolved the issue.

Thank you.