【问题标题】:jekyll 2.1.1 undefined method `deep_merge'jekyll 2.1.1 未定义方法“deep_merge”
【发布时间】:2026-02-07 11:00:01
【问题描述】:

我正在尝试从本地文件夹构建 jekyll dartlang.org 站点,但遇到了问题:

make build


rm -rf ./build
cd ./src/site && jekyll build && cd ../.. && cp -R ./src/appengine/* build/
Configuration file: Apps/jekyll/dartlang.org/src/site/_config.yml
       Deprecation: The 'pygments' configuration option has been renamed to 'highlighter'. Please update your config file accordingly. The allowed values are 'rouge', 'pygments' or null.
            Source: .
       Destination: ../../build/static
      Generating... 
  Liquid Exception: undefined method `deep_merge' for #<Hash:0x007fbe0cdee050> in _includes/header.html, included in _layouts/default.html
jekyll 2.1.1 | Error:  undefined method `deep_merge' for #<Hash:0x007fbe0cdee050>
make: *** [copy] Error 1

Gemfile.lock:

GEM
  remote: http://rubygems.org/
  specs:
    classifier (1.3.4)
      fast-stemmer (>= 1.0.0)
    colorator (0.1)
    commander (4.1.6)
      highline (~> 1.6.11)
    deep_merge (1.0.1)
    directory_watcher (1.4.1)
    fast-stemmer (1.0.2)
    highline (1.6.21)
    jekyll (1.2.1)
      classifier (~> 1.3)
      colorator (~> 0.1)
      commander (~> 4.1.3)
      directory_watcher (~> 1.4.1)
      liquid (~> 2.5.2)
      maruku (~> 0.5)
      pygments.rb (~> 0.5.0)
      redcarpet (~> 2.3.0)
      safe_yaml (~> 0.7.0)
    kramdown (1.0.2)
    liquid (2.5.5)
    maruku (0.7.2)
    posix-spawn (0.3.8)
    pygments.rb (0.5.4)
      posix-spawn (~> 0.3.6)
      yajl-ruby (~> 1.1.0)
    redcarpet (2.3.0)
    safe_yaml (0.7.1)
    yajl-ruby (1.1.0)
    yui-compressor (0.12.0)

PLATFORMS
  ruby

DEPENDENCIES
  deep_merge
  jekyll (= 1.2.1)
  kramdown (= 1.0.2)
  yui-compressor (= 0.12.0)
宝石列表 |grep jekyll 杰基尔 (2.1.1, 1.2.1) jekyll 咖啡脚本 (1.0.0) 杰基尔要点 (1.1.0) jekyll 分页 (1.0.0) jekyll-sass 转换器 (1.0.0) 杰基尔手表 (1.0.0)
bundle install
Using fast-stemmer 1.0.2
Using classifier 1.3.4
Using colorator 0.1
Using highline 1.6.21
Using commander 4.1.6
Using deep_merge 1.0.1
Using directory_watcher 1.4.1
Using liquid 2.5.5
Using maruku 0.7.2
Using posix-spawn 0.3.8
Using yajl-ruby 1.1.0
Using pygments.rb 0.5.4
Using redcarpet 2.3.0
Using safe_yaml 0.7.1
Using jekyll 1.2.1
Using kramdown 1.0.2
Using yui-compressor 0.12.0
Using bundler 1.6.3
Your bundle is complete!
红宝石-v ruby 2.0.0p451(2014-02-24 修订版 45167)[universal.x86_64-darwin13]
python --version
Python 2.7.3
捆绑-v 捆绑器版本 1.6.3

OsX 10.9.4

也许任何人都可以帮助我。

【问题讨论】:

  • bundle install 是否成功完成?
  • 您好,感谢您的收看。是的,捆绑安装成功

标签: dart jekyll


【解决方案1】:

您可以参考以下问题。

https://github.com/moshen/jekyll-asset_bundler/issues/22

deep_merge 方法应在您的 ruby​​ 代码中更改为 Utils.deep_merge_hashes。

【讨论】: