Jekyll搭建写作环境问题集锦

1. 本地不能访问

问题描述:

在浏览器中不能查看本地效果

http://localhost:4000

解决方法:

检查_config.yml配置文件是否需要修改

2. Jekyll3.0不能编译

问题描述:

Deprecation: You appear to have pagination turned on, but you haven’t included the jekyll-paginate gem. Ensure you have gems: [jekyll-paginate] in your configuration file.

故障原因:

jekyll自3.0版本以后不再支持相对路径,统一用绝对路径。

解决方法:

(1)打开_config.yml文件,将relative_permailinks:true注释掉;

在结尾添加

gems: [jekyll-paginate]

保存;

(2)接下来安装缺失的插件:

gem install pygments.rb

gem install redcarpet

现在编译Jekyll build

3. 下载认证文件

curl http://curl.haxx.se/ca/cacert.pem -o cacert.pem

设置环境变量,重新安装

4. :

  Dependency Error: Yikes! It looks like you don't have bundler 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 -- bundler' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.5.0 | Error:  bundler

安装bundler

gem install bundler

5. :

 Could not find gem 'minima (~> 2.0) x64-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)

安装Ruby环境

 gem install minima

6. :

   Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.

配置文件_config.yml中,使用了 plugins 的配置项,应该是用plugins替换掉gems。

感谢Licsber朋友的指正!

7. :

   Configuration file: /_config.yml
            Source: .
       Destination: ./_site
      Generating...
                    done.
  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 '.'
Configuration file: /_config.yml
jekyll 2.4.0 | Error:  Permission denied - bind(2) for 127.0.0.1:4000

使用 netstat 命令查看各种端口的被进程的占用情况,通过

tasklist /svc /FI "PID eq 11476"

查看具体哪一个进程占用,也可借助于第三方工具完成。

欢迎各位互动交流,重装几次系统,这些问题没有整理,见谅。后续会持续更近,感谢您的关注!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,026评论 19 139
  • Ubuntu的发音 Ubuntu,源于非洲祖鲁人和科萨人的语言,发作 oo-boon-too 的音。了解发音是有意...
    萤火虫de梦阅读 99,612评论 9 467
  • linux资料总章2.1 1.0写的不好抱歉 但是2.0已经改了很多 但是错误还是无法避免 以后资料会慢慢更新 大...
    数据革命阅读 12,240评论 2 33
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 46,974评论 6 342
  • 2006年,我从广告公司正式进入旅游局工作,期间经历了香港旅游局,美国各州中心负责宾夕法尼亚州和华盛顿特区的旅游推...
    flyingfish2007阅读 218评论 0 1