安装Jekyll
$ sudo gem install jekyll
如果遇到失败,换淘宝安装源:
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org
# 请确保只有 ruby.taobao.org
接下来就可以安装Jekyll了:
$ sudo gem install jekyll
另外,如果遇到如下错误,说明缺少依赖:
extconf failed, exit code 1
如果是在 Ubuntu 上安装ruby-dev
$ sudo apt-get install ruby-dev
$ sudo gem install jekyll