【问题标题】:Jekyll errors when starting the server启动服务器时出现 Jekyll 错误
【发布时间】:2017-02-13 23:05:50
【问题描述】:

我在 Ubuntu 上运行 Octopress/Jekyll。

当我执行以下命令时:

$ bundle exec rake generate preview

我收到以下错误:

/var/lib/gems/2.3.0/gems/liquid-2.5.5/lib/liquid/htmltags.rb:43: 
warning: key "index0" is duplicated and overwritten on line 46
Configuration file: /home/alex/Code/octopress/_config.yml
        Source: source
   Destination: public
  Generating... 
jekyll 2.0.0 | Error:  undefined method `extname' for 
#<Jekyll::StaticFile:0x00000003482d78>

这是我的 Gemfile:

source "https://rubygems.org"

group :development do
  gem 'rake', '~> 10.0'
  gem 'jekyll', '~> 2.0'
  gem 'octopress-hooks', '~> 2.2'
  gem 'octopress-date-format', '~> 2.0'
  gem 'jekyll-sitemap'
  gem 'rdiscount', '~> 2.0'
  gem 'RedCloth', '~> 4.2.9'
  gem 'haml', '~> 4.0'
  gem 'compass', '~> 1.0.1'
  gem 'sass-globbing', '~> 1.0.0'
  gem 'rb-fsevent', '~> 0.9'
  gem 'stringex', '~> 1.4.0'
  gem 'pygments.rb'
  gem 'maruku'
end

gem 'sinatra', '~> 1.4.2'

有人有什么想法吗? 提前致谢!

【问题讨论】:

    标签: ruby linux ubuntu jekyll octopress


    【解决方案1】:

    我已通过将我的 Gemfile 更新为:

    source "https://rubygems.org"
    
    group :development do
      gem 'rake', '~> 10.0'
      gem 'jekyll', '~> 3.4'
      gem 'octopress-hooks', '~> 2.2'
      gem 'octopress-date-format', '~> 3.0'
      gem 'jekyll-sitemap'
      gem 'rdiscount', '~> 2.0'
      gem 'RedCloth', '~> 4.2.9'
      gem 'haml', '~> 4.0'
      gem 'compass', '~> 1.0.1'
      gem 'sass-globbing', '~> 1.0.0'
      gem 'rb-fsevent', '~> 0.9'
      gem 'stringex', '~> 1.4.0'
      gem 'pygments.rb', '~> 0.6.3'
      gem 'jekyll-paginate'
    end
    
    gem 'sinatra', '~> 1.4.2'
    

    请注意,我的 pygments.rb gem 似乎无法正常工作 - 它没有根据语言(即 Ruby)突出显示代码语法:它只是更改字体系列并将其保持为平淡的灰色(而不是用红宝石颜色突出显示)。

    但这是另一个问题。 目前,最初的错误 - 至少 - 已解决。

    【讨论】:

      猜你喜欢
      • 2016-07-20
      • 2020-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多