【发布时间】:2022-12-25 17:23:21
【问题描述】:
我想在实时服务器上查看网站..但我还不熟悉 jekyll
首先我尝试了bundle exec jekyll serve,这是原子终端的输出:
PS C:\Users\user\Documents\GitHub\bioscreator-lp> bundle exec jekyll serve
Configuration file: C:/Users/user/Documents/GitHub/bioscreator-lp/_config.yml
Dependency Error: Yikes! It looks like you don't have tzinfo or one of its dependencies
installed. In order to use Jekyll as currently configured, you'll need to ins
tall this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the
tzinfo gem in your Gemfile as well. The full error message from Ruby is: 'can
not load such file -- tzinfo' If you run into trouble, you can find helpful resources at
https://jekyllrb.com/help/!
jekyll 4.0.0 | Error: tzinfo
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.0.0/lib/jekyll/external.rb:73:in `rescue
in block in require_with_graceful_fail': tzinfo (Jekyll::Errors::MissingDepend
encyException)
经过一些研究后,我尝试将 gem 'tzinfo-data' 放入 gemfile 并运行 bundle install
运行bundle exec jekyll serve
还有另一个错误:
PS C:\Users\user\Documents\GitHub\bioscreator-lp> bundle exec jekyll serve
Configuration file: C:/Users/user/Documents/GitHub/bioscreator-lp/_config.yml
jekyll 4.0.0 | Error: uninitialized constant TZInfo::Timezone
tz = TZInfo::Timezone.get(timezone)
^^^^^^^^^^
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/jekyll-4.0.0/lib/jekyll/utils/win_tz.rb:16:in
`calculate': uninitialized constant TZInfo::Timezone (NameError)
tz = TZInfo::Timezone.get
我在 stackoverflow 中找到了另一个解决方案,但看起来它只适用于旧版本的 jekyll ..我的版本是 4.0.0
【问题讨论】:
-
你能解决吗?如果是这样,我对你是如何做到的很感兴趣。