Jekyll::Drops::CollectionDrop:Class 的未定义方法 `delegate_method_as' (NoMethodError) 你是说吗?委托类
undefined method `delegate_method_as' for Jekyll::Drops::CollectionDrop:Class (NoMethodError) Did you mean? 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)
卸载后,尝试将 Jekyll 安装为 ruby gem:
gem install jekyll
这是唯一帮助我的东西
卸载 jekyll 的 apt 版本:
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
当我尝试在我们的 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)
卸载后,尝试将 Jekyll 安装为 ruby gem:
gem install jekyll
这是唯一帮助我的东西
卸载 jekyll 的 apt 版本:
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