ruby - 使用旧版本的 jekyll 捆绑
问题描述
我正在尝试使用 jekyll 预览我过去构建的网站。从那以后,我相信 jekyll 已经有了更新,我现在zsh
在 MacOS 10.15.2 上使用。我现在无法运行预览,因为它似乎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?
解决方案
推荐阅读
- c++ - 为什么在源文件中专门化模板不会导致错误?
- r - 无法使用包 rtweet 创建创建令牌,文件 '.rtweet_token.rds' 有问题
- javascript - 在仅使用 javascript(无库)单击所述元素时,如何将 html 元素类或 id 存储在变量中?
- image - 在 Flutter 中将具有自定义大小和旋转的图像绘制到 CustomPaint 中
- linux - dlopen 对“同一个库”的定义
- gulp - Gulpfile - 将 node_module dist 文件复制到根目录
- mysql - TRUNCATE 和 TRUNCATE TABLE 有什么区别?
- typescript - 如何获取 TypeScript 中重写方法的参数类型?
- php - 使用 $_SESSION 每次刷新(来自上一次)时数组中的唯一整数
- google-drive-api - 在 Google Drive 或 Dropbox 中托管图像以供应用使用