搭建本地jekyll环境遇到问题:
(据说gem source会被墙,所以在正式安装jekyll之前可以先换成。)
$ gem sources -l$ gem sources --remove https://rubygems.org/ $ gem sources -a http://ruby.taobao.org/$ gem install jekyll
报错1:
解决方案:(在前面加上 sudo)
$sudo gem install jekyll
报错2:
marongdeMacBook-Pro:jekyllTry marong$ jekyll --server Deprecation: Jekyll now uses subcommands instead of just switches. Run `jekyll help' to find out more. Deprecation: The --server command has been replaced by the 'serve' subcommand. invalid option: --server marongdeMacBook-Pro:jekyllTry marong$ jekyll --serve Deprecation: Jekyll now uses subcommands instead of just switches. Run `jekyll help' to find out more.
解决方案:(jekyll --serve 改为 jekyll serve)
报错3:
从github上clone下来jekyll的项目,用将site_template内文件拷贝到我的空项目目录中,jekyll serve启动失败。清空我的项目文件夹,再将jekyll项目根目录下site中所有文件拷贝到我的项目文件夹中,运行成功。不明。
marongdeMacBook-Pro:jekyllTry marong$ jekyll serveConfiguration file: /Users/marong/Project/github/jekyllTry/_config.yml Source: /Users/marong/Project/github/jekyllTry Destination: /Users/marong/Project/github/jekyllTry/_site Generating... ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ Post 0000-00-00-welcome-to-jekyll.markdown.erb does not have a valid date.marongdeMacBook-Pro:jekyllTry marong$ jekyll serveConfiguration file: /Users/marong/Project/github/jekyllTry/_config.yml Source: /Users/marong/Project/github/jekyllTry Destination: /Users/marong/Project/github/jekyllTry/_site Generating... done. Server address: http://0.0.0.0:4000 Server running... press ctrl-c to stop.