0

起初我可以使用 (not bundle exec)jekyll serve没有任何问题。然后我开始创建一个 yaml 数据文件(仍在尝试使其工作),但不知道如何,我“丢失”了 Gemfile 和 Gemfile.lock。当尝试运行 jekyll serve (有和没有bundle exec)时,我得到了一个错误结果。然后我再次添加了 Gemfile 和 Gemfile.lock 并得到了这个结果:

bundle exec jekyll serve
Configuration file: none
            Source: /Users/..../Documents/.../My_website/...
       Destination: /Users/..../Documents/.../My_website/.../_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
/Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
/Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
                    ------------------------------------------------
      Jekyll 4.0.0   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
Traceback (most recent call last):
        29: from /Users/..../.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
        28: from /Users/..../.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
        27: from /Users/..../.rvm/gems/ruby-2.7.0/bin/jekyll:23:in `<main>'
        26: from /Users/..../.rvm/gems/ruby-2.7.0/bin/jekyll:23:in `load'
        25: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
        24: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        23: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        22: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        21: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        20: from /Users/..../.rvm/gems/ruby-2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        19: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        18: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        17: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
        16: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
        15: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
        14: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
        13: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
        12: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:74:in `process'
        11: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:174:in `read'
        10: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/reader.rb:19:in `read'
         9: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:20:in `read'
         8: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:38:in `read_data_to'
         7: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:38:in `each'
         6: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:46:in `block in read_data_to'
         5: from /Users/..../.rvm/gems/ruby-2.7.0/gems/jekyll-4.0.0/lib/jekyll/readers/data_reader.rb:66:in `read_data_file'
         4: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `load_file'
         3: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `open'
         2: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:157:in `block in load_file'
         1: from /Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:143:in `load'
/Users/..../.rvm/gems/ruby-2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb:143:in `parse': (/Users/..../Documents/_VITO/My_website/website2020/_data/audio.yaml): mapping values are
 not allowed in this context at line 8 column 11 (Psych::SyntaxError)

该项目有一个 config.yaml 以及 Gemfile 和 Gemfile.lock。我不知道是什么Configuration file: none意思。

这就是我的 Gemfile 的样子:

# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# gem "rails"

gem "jekyll", "~> 4.0"

我确信我弄得一团糟(第一次接触 Jekyll),希望你能帮助我。

4

0 回答 0