我正在尝试使用jekyll预览过去建立的网站。从那时起,我相信jekyll已有更新,现在我在MacOS 10.15.2上使用zsh
。我现在无法运行预览,因为似乎bundle
一直在使用旧版本的jekyll
。
运行bundle exec jekyll server --unpublished
时收到此错误:
(base) ➜ angoodkind.github.io git:(master) ✗ bundle exec jekyll server --unpublished
Configuration file: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/_config.yml
NOTE: Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
Faraday::Error::ClientError.inherited called from /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/vendor/cache/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.
Source: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io
Destination: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Error reading file /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/blog/index.html: (<unknown>): did not find expected key while parsing a block mapping at line 7 column 5
Error: could not read file /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/vendor/cache/ruby/2.6.0/gems/jekyll-3.5.2/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb: Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/cache/ruby/2.6.0/gems/jekyll-3.5.2/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/cache/ruby/2.6.0/gems/jekyll-3.5.2/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
但是,系统应使用最近安装的jekyll 4.0.0。为什么使用jekyll 3.5.2?