<
jekyll 排错
>
上一篇

博客一些功能实现

没有下一篇咯
搭博客过程中常见错误处理办法

解决办法

(Gem::LoadError)

D:\Github\EL-z10.github.io>jekyll -v
Traceback (most recent call last):
        10: from C:/Ruby26-x64/bin/jekyll:23:in `<main>'
         9: from C:/Ruby26-x64/bin/jekyll:23:in `load'
         8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jekyll-4.0.0/exe/jekyll:11:in `<top (required)>'
         7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
         6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-1.16.2/lib/bundler.rb:107:in `setup'
         5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:26:in `setup'
         4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:26:in `map'
         3: from C:/Ruby26-x64/lib/ruby/2.6.0/forwardable.rb:230:in `each'
         2: from C:/Ruby26-x64/lib/ruby/2.6.0/forwardable.rb:230:in `each'
         1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:31:in `block in setup'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:313:in `check_for_activated_spec!': You have already activated i18n 1.8.2, but your Gemfile requires i18n 0.9.5. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)

处理:

YDXNPf.png

来自https://superuser.com/questions/1483914/jekyll-serve-error-after-updating-ruby-bundler-and-jekyll

仅需在jekyll前键入bundle exec即可

(Bundler::GemNotFound)

YDXYIP.png

输入bundle update即可,不行的话再bundle install

一些tips

1.git bash中复制是ctrl+ins, 粘贴是ctrl+shift

2.jekyll serve 状态中本地网站无法跟踪_config.yml的变化(技术原因),若更改 _config.yml需先ctrl+c退出,y确定,再bundle exec jekyll serve

3.md文件名不能有中文,而且格式得是:2020-05-01-a title.md

中文会404。

Top
Foot