本文介绍了Jekyll::Drops::CollectionDrop:Class(NoMethodError)的未定义方法`Delegate_Method_AS';您是指什么?DelegateClass的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试更新Debian buster服务器上的Jekyll项目时,收到以下错误:
$ bundle exec jekyll build
Traceback (most recent call last):
12: from /usr/local/bin/jekyll:23:in `<main>'
11: from /usr/local/bin/jekyll:23:in `load'
10: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/exe/jekyll:8:in `<top (required)>'
9: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/exe/jekyll:8:in `require'
8: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll.rb:191:in `<top (required)>'
7: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll.rb:12:in `require_all'
6: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll.rb:12:in `each'
5: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll.rb:13:in `block in require_all'
4: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll.rb:13:in `require'
3: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll/drops/collection_drop.rb:3:in `<top (required)>'
2: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll/drops/collection_drop.rb:4:in `<module:Jekyll>'
1: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll/drops/collection_drop.rb:5:in `<module:Drops>'
/var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll/drops/collection_drop.rb:10:in `<class:CollectionDrop>': undefined method `delegate_method_as' for Jekyll::Drops::CollectionDrop:Class (NoMethodError)
Did you mean? DelegateClass
仅jekyll build
相同。
我也已经尝试过了:
bundle update
几个月前它是这样工作的。
我的项目是:https://github.com/freifunk-kiel/startseite/blob/master/Gemfile
我尝试重新安装Jekyll:
PACKAGES="$(dpkg -l |grep jekyll|cut -d" " -f3|xargs )"
apt remove --purge $PACKAGES
我有这些包
jekyll ruby-jekyll-coffeescript ruby-jekyll-feed ruby-jekyll-gist ruby-jekyll-paginate ruby-jekyll-sass-converter ruby-jekyll-watch
然后重新安装:
apt install jekyll
这将再次安装相同的软件包:
jekyll ruby-jekyll-coffeescript ruby-jekyll-feed ruby-jekyll-gist ruby-jekyll-paginate ruby-jekyll-sass-converter ruby-jekyll-watch
但这也无济于事
更新:
我还尝试卸载所有Jekyll软件包,然后使用
安装更新的Jekyll版本gem install jekyll jekyll-feed jekyll-gist jekyll-paginate jekyll-sass-converter jekyll-coffeescript
但这给了我另一个错误:
# jekyll build --trace
Traceback (most recent call last):
27: from /usr/local/bin/jekyll:23:in `<main>'
26: from /usr/local/bin/jekyll:23:in `load'
25: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/exe/jekyll:8:in `<top (required)>'
24: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
23: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
22: from /var/lib/gems/2.5.0/gems/jekyll-4.2.0/lib/jekyll.rb:195:in `<top (required)>'
21: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
20: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
19: from /var/lib/gems/2.5.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'
18: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
17: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
16: from /var/lib/gems/2.5.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
15: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
14: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
13: from /var/lib/gems/2.5.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'
12: from /var/lib/gems/2.5.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
11: from /var/lib/gems/2.5.0/gems/sassc-2.4.0/lib/sassc/native.rb:3:in `<top (required)>'
10: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
9: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
8: from /usr/lib/ruby/vendor_ruby/ffi.rb:9:in `<top (required)>'
7: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
6: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
5: from /usr/lib/ruby/vendor_ruby/ffi/ffi.rb:31:in `<top (required)>'
4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
2: from /usr/lib/ruby/vendor_ruby/ffi/platform.rb:32:in `<top (required)>'
1: from /usr/lib/ruby/vendor_ruby/ffi/platform.rb:37:in `<module:FFI>'
/usr/lib/ruby/vendor_ruby/ffi/platform.rb:57:in `<module:Platform>': uninitialized constant FFI::Platform::CPU (NameError)
推荐答案
使用以下命令卸载APT版本的Jekyll:
PACKAGES="$(dpkg -l |grep jekyll|cut -d" " -f3|xargs )" sudo apt remove --purge $PACKAGES
重要!卸载所有Debian程序包后清理您的依赖库:
sudo apt autoremove
然后通过GEM安装所有需要的Jekyll包,例如:
sudo gem install jekyll jekyll-feed jekyll-gist jekyll-paginate jekyll-sass-converter jekyll-coffeescript
然后在项目目录中运行:
bundle update
这篇关于Jekyll::Drops::CollectionDrop:Class(NoMethodError)的未定义方法`Delegate_Method_AS';您是指什么?DelegateClass的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!