运行“ bundle exec jekyll serve”时出错

问题描述

使用终端运行bundle exec jekyll servejekyll serve时出现错误

我有一个基于最小错误主题的静态网站,并将其发布在Github上。在编辑网站时,通常我通常使用Jekyll在本地检查网站(在本地运行要快得多,然后将更改推送到网站并等待更改发生)。但是由于某些原因,我无法再使用Jekyll在本地运行该网站,这给了我下面描述的错误

要重现该错误,可以执行以下操作(假设您已经installed Jekyll):

  1. 我将git clone https://github.com/mmistakes/minimal-mistakes.git克隆到某个文件夹的最小错误主题
  2. 然后cd进入minimal-mistakes文件
  3. 运行bundle exec jekyll serve

要检查编辑更改,我曾经做过以下事情:

Run `jekyll serve` in the directory of theme contents
[!] There was an error parsing `Gemfile`:
[!] There was an error while loading `minimal-mistakes-jekyll.gemspec`: No such file or directory - git ls-files -z. Bundler cannot continue.

 #  from C:/Users/Dell/Desktop/New folder/minimal-mistakes/minimal-mistakes-jekyll.gemspec:14
 #  -------------------------------------------
 #    spec.add_development_dependency "rake",">= 12.3.3"
 >  end
 #  # coding: utf-8
 #  -------------------------------------------
. Bundler cannot continue.

 #  from C:/Users/Dell/Desktop/New folder/minimal-mistakes/Gemfile:2
 #  -------------------------------------------
 #  source "https://rubygems.org"
 >  gemspec #  source "https://rubygems.org"
 #  -------------------------------------------

解决方法

您是否尝试过在bundle之前运行bundle exec jekyll serve

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...