2017-02-13 146 views
0

我在Ubuntu上運行Octopress/Jekyll。啓動服務器時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' 

任何人有什麼想法? 在此先感謝!

回答

0

我已經解決通過更新我的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寶石似乎並沒有正常工作 - 它不根據語言彰顯代碼語法(即紅寶石):它只是改變字體系列,並保持它平淡的灰色(而不是在Ruby顏色突出顯示)。

但這是另一個問題。 現在,最初的錯誤 - 至少 - 已經解決。