【问题标题】:Jekyll 3.7.3 | Error: No source of timezone data could be found杰基尔 3.7.3 |错误:找不到时区数据的来源
【发布时间】:2018-12-06 18:04:09
【问题描述】:
Configuration file: C:/Users/NiKhil GarakaPati/Documents/GitHub/Nikhil- 
Garakapati.github.io/_config.yml
jekyll 3.7.3 | Error:  No source of timezone data could be found.
Please refer to http://tzinfo.github.io/datasourcenotfound for help resolving 
this error.

我在将 Jekyll 模板安装到我的 Github 页面时遇到此错误。我尝试将这个 timezone: "America/Vancouver" 添加到我的 _config.yml 文件中,但是没有用。然后我尝试在终端上运行 gem install tzinfo-data,但没有清除错误。

谁能解决这个问题?

【问题讨论】:

    标签: ruby-on-rails github jekyll


    【解决方案1】:

    从文件路径的结构来看,我猜你是在 Windows 机器上。 tzinfo-data gem 对在 Windows 上工作有点挑剔。以下是docs 的解决方法。

    如果您使用的是 Ruby on Rails 并且您的项目是在 Windows 上创建的,那么您可能会发现 Gemfile 中已经有如下一行:

    gem 'tzinfo-data', platforms: [:mingw, :mswin]

    如果您在 Windows 上使用 64 位版本的 Ruby,则将 :x64_mingw 添加到平台列表中,如下所示:

    gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]

    因此,如果您使用的是 gemfile,请确保将该 gem 放入文件中。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多