jekyll 3.0.1 | Error: undefined method `map!' for nil:NilClass
jekyll 3.0.1 | Error: undefined method `map!' for nil:NilClass
我想对一个 jekyll 站点进行更新 - 但在尝试 "jekyll serve" 我现在得到:
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>'
已编辑答案:观察您的痕迹,我们可以看到您在
之间发生了碰撞
/usr/lib/ruby/vendor_ruby/jekyll/
和
/var/lib/gems/2.3.0/gems/jekyll-3.0.5/
个人而言,我选择 rbenv 也是为了避免这种情况。
旧答案 :
如果您使用 bundler
,您必须使用 bundle exec jekyll serve
启动 Jekyll。
我刚刚在您的存储库上对其进行了测试,它运行良好。
我想对一个 jekyll 站点进行更新 - 但在尝试 "jekyll serve" 我现在得到:
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>'
已编辑答案:观察您的痕迹,我们可以看到您在
之间发生了碰撞/usr/lib/ruby/vendor_ruby/jekyll/
和
/var/lib/gems/2.3.0/gems/jekyll-3.0.5/
个人而言,我选择 rbenv 也是为了避免这种情况。
旧答案 :
如果您使用 bundler
,您必须使用 bundle exec jekyll serve
启动 Jekyll。
我刚刚在您的存储库上对其进行了测试,它运行良好。