看了官方文档才意识到Windows 10已经默认支持了windows subsystem for linux,直接在命令行里执行 bash
就可以切换到linux环境。
查看Windows 10的系统版本: cmd 运行 winver
即可查看。或者在window + x
打开控制面板查看
当然还是需要先安装一下Windows Subsystem for Linux Installation Guide for Windows 10
还是专注在Jekyll本身吧,使用exe方式安装即可,暂时不折腾Windows上的linux了。
Jekyll本身依赖环境包括:
- Ruby version 2.4.0 or above, including all development headers (ruby version can be checked by running
ruby -v
) - RubyGems (which you can check by running
gem -v
) - GCC and Make (in case your system doesn’t have them installed, which you can check by running
gcc -v
,g++ -v
andmake -v
in your system’s command line interface)
- 安装ruby环境完成后,使用gem安装jekyll:
gem install jekyll bundler
(27 gems installed) - 检查是否安装成功
jekyll -v
(jekyll 4.0.0)
搞定。
Window环境下使用 MSYS2 based RubyInstaller for Windows https://rubyinstaller.org 安装。rubyinstaller2 本身是一个开源软件。最新的下载版本下载页面
RubyInstaller combines the possibilities of native Windows programs with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries. It is a great foundation to use Ruby for development and production
安装完成后,可以勾选择安装 MSYS2( a software distro and building platform for Windows)
也可以安装完成后,手动安装ridk install
,可以使用 ridk help
查看帮助