gpt4 book ai didi

ruby - Jekyll:参数数量错误(给定 2,预期为 1)(ArgumentError)

转载 作者:行者123 更新时间:2023-12-04 16:41:22 24 4
gpt4 key购买 nike

试图jekyll serve在我的项目中,但我有以下问题(带有恍惚标志 -t)

Configuration file: /Users/victor/Documents/Github/vict0rsch/vict0rsch.github.io/_config.yml
Source: .
Destination: ./_site
Incremental build: disabled. Enable with --incremental
Generating...
Traceback (most recent call last):
26: from /usr/local/bin/jekyll:22:in `<main>'
25: from /usr/local/bin/jekyll:22:in `load'
24: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/exe/jekyll:15:in `<top (required)>'
23: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
22: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
21: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
20: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
19: from /usr/local/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
18: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
17: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `start'
16: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `each'
15: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/serve.rb:93:in `block in start'
14: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:36:in `process'
13: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/commands/build.rb:65:in `build'
12: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/command.rb:28:in `process_site'
11: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:69:in `process'
10: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:166:in `read'
9: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:102:in `trigger'
8: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:102:in `each'
7: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:103:in `block in trigger'
6: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets.rb:24:in `block in <top (required)>'
5: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets.rb:24:in `new'
4: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:48:in `initialize'
3: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/env.rb:48:in `new'
2: from /usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/manifest.rb:29:in `initialize'
1: from /usr/local/lib/ruby/gems/2.6.0/gems/sprockets-4.0.0/lib/sprockets/manifest.rb:56:in `initialize'
/usr/local/lib/ruby/gems/2.6.0/gems/jekyll-assets-3.0.12/lib/jekyll/assets/manifest.rb:58:in `find_directory_manifest': wrong number of arguments (given 2, expected 1) (ArgumentError)

我什至不知道从哪里开始调查。

请注意,我知道并尝试过 thisthat问题。

最佳答案

根据https://github.com/envygeeks/jekyll-assets/issues/622这其实是sprockets 4.0.0的问题.

您可以通过在 Gemfile 中强制使用早期版本来修复它:

gem "sprockets", "~> 3.7"

然后运行

bundle install

获取新的 gem 并更新您的 Gemfile.lock

关于ruby - Jekyll:参数数量错误(给定 2,预期为 1)(ArgumentError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60198057/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com