我想对一个jekyll网站进行更新 - 但是在尝试" jekyll服务"我现在得到:
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /home/ligi/git/espass.github.io/_config.yml
jekyll 3.0.1 | Error: undefined method `map!' for nil:NilClass
使用bundle exec jekyll serve 也失败
➜ espass.github.io git:(master) ✗ bundle exec jekyll serve
Configuration file: /home/ligi/git/espass.github.io/_config.yml
jekyll 3.0.1 | Error: undefined method `map!' for nil:NilClass
任何人都知道如何追查此错误?在互联网上找不到任何关于它的信息,而且有点困在这里
编辑:
➜ espass.github.io git:(master) ✗ bundle exec jekyll serve --trace
Configuration file: /home/ligi/git/espass.github.io/_config.yml
/usr/lib/ruby/vendor_ruby/jekyll/configuration.rb:246:in `block in backwards_compatibilize': undefined method `map!' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/vendor_ruby/jekyll/configuration.rb:238:in `each'
from /usr/lib/ruby/vendor_ruby/jekyll/configuration.rb:238:in `backwards_compatibilize'
from /usr/lib/ruby/vendor_ruby/jekyll/configuration.rb:189:in `read_config_files'
from /var/lib/gems/2.3.0/gems/jekyll-3.0.5/lib/jekyll.rb:101:in `configuration'
from /usr/lib/ruby/vendor_ruby/jekyll/command.rb:42:in `configuration_from_options'
from /var/lib/gems/2.3.0/gems/jekyll-3.0.5/lib/jekyll/commands/build.rb:29:in `process'
from /var/lib/gems/2.3.0/gems/jekyll-3.0.5/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `block in execute'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `each'
from /usr/lib/ruby/vendor_ruby/mercenary/command.rb:220:in `execute'
from /usr/lib/ruby/vendor_ruby/mercenary/program.rb:42:in `go'
from /usr/lib/ruby/vendor_ruby/mercenary.rb:19:in `program'
from /var/lib/gems/2.3.0/gems/jekyll-3.0.5/bin/jekyll:17:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
答案 0 :(得分:2)
编辑回答:观察您的追踪,我们可以看到您之间发生了碰撞
/usr/lib/ruby/vendor_ruby/jekyll/
和
/var/lib/gems/2.3.0/gems/jekyll-3.0.5/
Personnaly,我也和rbenv一起去避免这种情况。
旧回答:
如果您使用bundler
,则必须使用bundle exec jekyll serve
启动Jekyll。
我刚刚在您的存储库上测试过,它运行良好。