问题1
在执行bundle exec jekyll serve之后会报如下错误:
Dependency Error: Yikes! It looks like you don’t have jekyll-paginate
or one of its dependencies installed. In order to use Jekyll as currently configured,
you’ll need to install this gem. The full error message from Ruby is: ‘cannot load such file
– jekyll-paginate’ If you run into trouble, you can find helpful resources at Getting Help
jekyll 3.1.2 | Error: jekyll-paginate
我在最初使用的时候出现了这个错误。
前提是已经使用gem install jekyll-paginate安装了jekyll-paginate,并提示安装成功。并且使用gem listkeyi 查看到。
解决方法
- 在_config.yml文件中添加如下代码
gems:
- jekyll-paginate
exclude:
- Gemfile
- Gemfile.lock
2.编辑Gemfilewen在其中添加
gem "jekyll-paginate"
问题2
在执行bundle exec jekyll serve之后会报如下错误:
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'C:/Users/KUN/kun.github.io'
Configuration file: C:/Users/KUN/kun.github.io/_config.yml
jekyll 3.4.2 | Error: Permission denied - bind(2) for 127.0.0.1:4000原因:Jekyll的默认端口是4000肯能被代理等其它软件占用
解决方法:
编辑_config.yml文件,添加port: 5001 找一个不占用的端口号替换即可