【问题标题】:Jekyll on Windows not compiling SASSWindows 上的 Jekyll 不编译 SASS
【发布时间】:2019-07-24 04:51:14
【问题描述】:

尝试在 Windows 10 机器上运行 bundle exec jekyll serve 时,会出现以下错误:

jekyll 3.7.4 | Error: File to import not found or unreadable: reset.
Load paths:
  C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/minima-2.5.0/_sass
  C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/minima-2.5.0/_sass on line 6

我的目录结构如下:

.
├── _config.yml
├── README.md
├── _sass
|   ├── _reset.scss
|   └── _variables.scss
├── assets
|   ├── styles
|   |   └── design.scss
├── .gitignore
├── Gemfile
├── Gemfile.lock
└── index.md

请注意,这适用于我的 Mac(我刚刚克隆了 git 存储库并尝试在 Windows 上提供服务)。

我尝试将其添加到 _config.yml,但没有任何改变。

sass:
  sass_dir: _sass

【问题讨论】:

  • 我遇到了同样的问题。您找到解决方案了吗?
  • @ChristianHagelid 不确定它是否与您相关,但我切换到使用适用于 Windows 的 Linux 子系统

标签: ruby windows sass jekyll


【解决方案1】:

我从“原生 Windows”切换到 docker 来构建我的 Jekyll 页面。

Jekyll on Docker Hub.

在使用 docker 之前创建文件夹$PWD/vendor/bundle

docker run -it --rm \ --volume="$PWD:/srv/jekyll" \ --volume="$PWD/vendor/bundle:/usr/local/bundle" \ jekyll/jekyll \ jekyll build

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 2017-03-16
    • 1970-01-01
    • 2012-10-01
    相关资源
    最近更新 更多