在 Windows 上搭建本地 Jekyll 编译环境时问题汇总
来源:互联网 发布:软件应届生求职怎么样 编辑:程序博客网 时间:2024/06/01 08:47
按照 在 Windows 上安装 Jekyll 操作。
参考链接
- 在 Windows 上安装 Jekyll
- Setting up your GitHub Pages site locally with Jekyll - github
- Run Jekyll on Windows
故障诊断
问题一
C:\WINDOWS\system32>gem install jekyll ERROR: While executing gem ... (Errno::EINVAL) Invalid argument @ rb_file_s_stat - H:/
HOMEDRIVE 被设置到了 H 盘。
解决办法:
SET HOMEDRIVE=C:
参考链接:Error running gem install on Windows 7 64 bit
问题二
C:\WINDOWS\system32>gem install jekyll ERROR: Could not find a valid gem 'jekyll' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
公司网络无法使用 https 访问 rubygems 官网。
解决办法:
gem install jekyll -r --source http://rubygems.org/
或者,修改根目录下面的 Gemfile 文件,将
source 'https://rubygems.org'
改为
source 'http://rubygems.org'
参考链接:gem 2.0.3 Unable to download data from https://rubygems.org/ - … bad ecpoint
问题三
jekyll serve C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bun dler (LoadError) from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/jekyll-3.3.0/lib/jekyll/plugin_manager.rb:34:in `require_f rom_bundler' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/jekyll-3.3.0/exe/jekyll:9:in `<top (required)>' from C:/Ruby23-x64/bin/jekyll:23:in `load' from C:/Ruby23-x64/bin/jekyll:23:in `<main>'
解决办法:
gem install bundler -r --source http://rubygems.org/
或者,从 rubygems.org 下载 gem,本地安装
gem install bundler-1.13.6.gem
参考链接:cannot load such file — bundler/setup (LoadError)
问题四
jekyll serve C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:366:in `block in verify_gemfile_ dependencies_are_found!': Could not find gem 'github-pages x64-mingw32' in any of the gem sources listed in yo ur Gemfile or available on this machine. (Bundler::GemNotFound) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:341:in `each' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:341:in `verify_gemf ile_dependencies_are_found!'
解决办法:
通过 bundler 安装依赖,
bundle install
或者
gem install github-pages -r --source http://rubygems.org/ gem install wdm -r --source http://rubygems.org/
问题五
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:40:in `block in setup': You have already act ivated jekyll-sass-converter 1.4.0, but your Gemfile requires jekyll-sass-converter 1.3.0. Prepending `bundle exec` to yo ur command may solve this. (Gem::LoadError)
解决办法:
版本冲突,删除
/Users/Air/git/fangchd/Gemfile.lock
或者
gem uninstall jekyll-sass-converter Select gem to uninstall: 1. jekyll-sass-converter-1.3.0 2. jekyll-sass-converter-1.4.0 3. All versions > 2 Successfully uninstalled jekyll-sass-converter-1.4.0 gem uninstall kramdown gem uninstall jekyll
参考链接:You have already activated X, but your Gemfile requires Y
问题六
jekyll serve ... Generating... Liquid Exception: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configur ation, or set up an 'origin' git remote pointing to your github.com repository. in /Users/dongf/MyStuff/git/fangchd.githu b.io/_layouts/default.html ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configur ation, or set up an 'origin' git remote pointing to your github.com repository.
解决办法:
在 fangchd.github.io_config.yml 中添加
repository: fangchd/fangchd.github.io
参考链接:Cannot run Jekyll locally with “No repo name found”.
问题七
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
解决办法:
在系统环境变量中添加 JEKYLL_GITHUB_TOKEN 和 SSL_CERT_FILE。
如果通过代理才能访问 GitHub,设置环境变量 HTTP_PROXY
SET HTTP_PROXY=http://domain%5Cusername:[email protected]
:port
如果是在 MacOS 下,则需要使用
export http_proxy='http://127.0.0.1:4411/'
参考链接:
- Fix the errors of GitHub Metadata and SSL certificate when running Jekyll serve
- GitHub Module Shows Out-of-Date Metadata
- How do I update Ruby Gems from behind a Proxy (ISA-NTLM)
阅读全文
1 0
- 在 Windows 上搭建本地 Jekyll 编译环境时问题汇总
- Windows 上通过本地搭建 Jekyll环境
- 搭建本地Jekyll环境
- Jekyll本地环境搭建
- Jekyll搭建本地环境
- Windows8 环境下的 jekyll 本地搭建
- jekyll本地环境搭建(Ubuntu 12.04)
- Ruby x Jekyll 本地调试环境搭建
- opengl 在windows环境搭建的相关问题汇总
- github创建博客——windows平台下github+jekyll本地环境搭建
- Jekyll在Github上搭建博客
- 使用Jekyll在Github上搭建博客
- 在windows上搭建React Native开发环境时遇到licence问题的解决
- ubuntu 搭建 Jekyll环境
- ubuntu 搭建 Jekyll环境
- 在windows上搭建linux开发环境
- 在Windows上搭建Android开发环境
- 在Windows上搭建Android开发环境
- 51Nod-1773-A国的贸易
- 注解的定义和使用
- Python标准库--re
- Spring Boot 快速入门
- Linux下如何开启MySQL的log_bin日志
- 在 Windows 上搭建本地 Jekyll 编译环境时问题汇总
- UC浏览器主界面滑动折叠效果 使用自定义behavior实现 难度五颗星*****
- 《Javascript高级程序设计(第3版)》阅读笔记(持续更新)
- LINUX学习之GIT
- Activity管理器-2
- poj 2411 用1x2填充n*m 状态压缩DP
- win10 资源管理器打开FTP站点跳到IE
- Python图像处理库
- 1023. Have Fun with Numbers (20)