Jeklly本地搭建运行博客模板
前言
先安装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、打开本地环境
感兴趣的,欢迎添加博主微信,
哈,博主很乐意和各路好友交流,如果满意,请打赏博主任意金额,感兴趣的在微信转账的时候,备注您的微信或者其他联系方式。添加博主微信哦。
请下方留言吧。可与博主自由讨论哦
支付包 | 微信 | 微信公众号 |
---|---|---|