美文网首页jekyllJekyll搭建Github写作环境
Jekyll搭建写作环境问题集锦

Jekyll搭建写作环境问题集锦

作者: Titan_LEE | 来源:发表于2017-07-09 19:28 被阅读1323次

    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"
    

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

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

    相关文章

      网友评论

      • Licsber:感谢作者分享 第6条写反了 "配置文件_config.yml中,使用了 plugins 的配置项,用 gems 替换 plugins 即可。"应该是用plugins替换掉gems.
        Titan_LEE:感谢您的指正。应该是用plugins替换掉gems.新版本中使用

      本文标题:Jekyll搭建写作环境问题集锦

      本文链接:https://www.haomeiwen.com/subject/ctlehxtx.html