我正在重新访问几年前用Jekyll建立的静态网站,在本地编译源代码然后发送到我的github页面网站时遇到了麻烦。我在技术上并不熟练,所以请原谅下面的任何错误。
奇怪的工作流程的原因是需要使用Jekyll-scholar和bibtex-ruby gems,所以我基本上必须在本地构建,然后提交并部署到github页面。我看到下面的问题,它停止了jekyll构建:
C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- racc/parser.rb (LoadError)
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bibtex-ruby-6.0.0/lib/bibtex/name_parser.rb:7:in `<top (required)>'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bibtex-ruby-6.0.0/lib/bibtex.rb:60:in `<top (required)>'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-scholar-7.1.3/lib/jekyll/scholar.rb:6:in `<top (required)>'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-scholar-7.1.3/lib/jekyll-scholar.rb:1:in `<top (required)>'
from <internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from C:/Ruby33-x64/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/lib/bundler/runtime.rb:55:in `each'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/lib/bundler/runtime.rb:55:in `block in require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/lib/bundler/runtime.rb:44:in `each'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/lib/bundler/runtime.rb:44:in `require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/lib/bundler.rb:187:in `require'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-4.3.3/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
from C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/jekyll-4.3.3/exe/jekyll:11:in `<top (required)>'
from C:/Ruby33-x64/bin/jekyll:32:in `load'
from C:/Ruby33-x64/bin/jekyll:32:in `<main>'
字符串
为了清楚起见,我包括GEM文件:
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
bibtex-ruby (6.0.0)
latex-decode (~> 0.0)
citeproc (1.0.10)
namae (~> 1.0)
citeproc-ruby (1.1.14)
citeproc (~> 1.0, >= 1.0.9)
csl (~> 1.6)
colorator (1.1.0)
concurrent-ruby (1.2.2)
csl (1.6.0)
namae (~> 1.0)
rexml
csl-styles (1.0.1.11)
csl (~> 1.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.25.1)
http_parser.rb (0.8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-scholar (7.1.3)
bibtex-ruby (~> 6.0)
citeproc-ruby (~> 1.0)
csl-styles (~> 1.0)
jekyll (~> 4.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
json (2.7.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
latex-decode (0.4.0)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
namae (1.1.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.4)
rack (2.2.8)
rackup (1.0.0)
rack (< 3)
webrick
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rouge (4.2.0)
safe_yaml (1.0.5)
sass-embedded (1.69.5-x64-mingw-ucrt)
google-protobuf (~> 3.23)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)
webrick (1.8.1)
PLATFORMS
x64-mingw-ucrt
DEPENDENCIES
jekyll-scholar
json
rack (~> 2.0)
rackup
BUNDLED WITH
2.5.3
型
正如你所看到的,我使用的是Ruby 3.3.0 -我很感激任何关于如何修复这个问题的指针-我从其他论坛上看到,解析器可能有一个权利问题,但我不知道如何修复它,基本上我能做什么(在极端情况下注解掉什么)-输出格式非常不直观。提前感谢!
我试过降级相关宝石的版本,并添加论坛帖子建议的新宝石,都没有运气。
我在jekyllrb的讨论页上没有看到任何相关的帖子。
2条答案
按热度按时间tp5buhyn1#
添加到您的
Gemfile
gem 'racc'
并运行bundle install
在我的情况下,它修复了这个问题。jbose2ul2#
我也有这个问题。虽然Serj发布的解决方案有效,但理想的修复应该在
bibtex-ruby
本身中实现。我已经打开了一个问题here。