前言

Github:https://github.com/HealerJean

博客:http://blog.healerjean.com

先安装Ruby和gem,这里就不介绍了

1、安装Jekyll

gem install jekyll

1.1、上面的命令报错

Could not find a valid gem ‘jekyll’ 安装jekyll问题

healerjean$ gem sources --remove https://rubygems.org/
healerjean$ gem sources -a https://gems.ruby-china.com/
healerjean$ gem sources -l
*** CURRENT SOURCES ***
	
https://gems.ruby-china.com/
healerjean$ gem install jekyll 

开始安装………………


2、下载好我们要启用的模块模板之后,在模板路径下打开

jekyll serve 

2.1、报错

/usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/bundler/resolver.rb:289:in `block in verify_gemfile_dependencies_are_found!’: Could not find gem ‘github-pages’ in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)

解决

gem install bundle

2.2、继续运行报错

jekyll serve

You have already activated public_suffix 3.0.3, but your Gemfile requires public_suffix 2.0.5. Prepending bundle exec to your command may solve this. (Gem::LoadError)

解决:启动成功

bundle exec jekyll serve

3、打开本地环境

http://localhost:4000

ContactAuthor