2017-04-15 95 views
0

我最近剛做了一堆我的哲基爾站點升級來獲得一個插件來安裝,現在當我建立我得到這個後建立傑基爾3.4.3:錯誤當試圖升級

`jekyll 3.4.3 | Error: undefined method `gsub' for 25:Integer` 

完整的堆棧:

Configuration file: /Users/susanjrobertson/Sites/jekyll_site/_config.yml 
      Source: /Users/susanjrobertson/Sites/jekyll_site 
     Destination: /Users/susanjrobertson/Sites/jekyll_site/_site 
Incremental build: disabled. Enable with --incremental 
     Generating... 
/Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/utils.rb:213:in `slugify': undefined method `gsub' for 25:Integer (NoMethodError) 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/drops/url_drop.rb:22:in `title' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/drops/drop.rb:52:in `public_send' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/drops/drop.rb:52:in `[]' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/url.rb:112:in `block in generate_url_from_drop' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/url.rb:102:in `gsub' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/url.rb:102:in `generate_url_from_drop' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/url.rb:69:in `generate_url' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/url.rb:60:in `generated_url' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/url.rb:40:in `to_s' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/document.rb:200:in `url' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/document.rb:214:in `destination' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/regenerator.rb:176:in `regenerate_document?' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/regenerator.rb:25:in `regenerate?' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:451:in `block (2 levels) in render_docs' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:450:in `each' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:450:in `block in render_docs' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:449:in `each' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:449:in `render_docs' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:190:in `render' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/site.rb:69:in `process' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/command.rb:26:in `process_site' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:63:in `build' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:34:in `process' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:16:in `block (2 levels) in init_with_program' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/gems/jekyll-3.4.3/exe/jekyll:13:in `<top (required)>' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/bin/jekyll:22:in `load' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/bin/jekyll:22:in `<main>' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval' 
    from /Users/susanjrobertson/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>' 

我不是最拿手的這些事情,而且不知道這裏發生了什麼或如何解決它。 X代碼是最新的,我正在使用一個紅寶石包管理器來讓寶石一起工作,但仍然看到了這個最後的錯誤。

任何想法?謝謝!

+0

我發現如果我用舊版本的Jekyll(2。4)我可以運行服務器,這一切都很好,現在對我來說這是一個好的解決方法。但我想了解Jekyll 3的情況。 –

回答

0

安裝後我只是有同樣的錯誤。又到了哲基爾文檔寶石目錄就跑......

化身成爲

該命令與退出...

Configuration file: C:/ruby217/lib/ruby/gems/2.1.0/gems/jekyll-docs-3.1.1/site/_config.yml Dependency Error: Yikes! It looks like you don't have jekyll-feed or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-feed' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! jekyll 3.1.1 | Error: jekyll-feed 

所以,我沒有...

創業板安裝傑奇-feed 傑基爾服務

這一次......

Configuration file: C:/ruby217/lib/ruby/gems/2.1.0/gems/jekyll-docs-3.1.1/site/_config.yml Dependency Error: Yikes! It looks like you don't have jekyll-redirect-from or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-redirect-from' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! jekyll 3.1.1 | Error: jekyll-redirect-from 

再次...

創業板安裝哲基爾重定向消息從 傑奇服務

這一次......

Configuration file: C:/ruby217/lib/ruby/gems/2.1.0/gems/jekyll-docs-3.1.1/site/_config.yml Source: C:/ruby217/lib/ruby/gems/2.1.0/gems/jekyll-docs-3.1.1/site Destination: C:/ruby217/lib/ruby/gems/2.1.0/gems/jekyll-docs-3.1.1/site/_site Incremental build: disabled. Enable with --incremental Generating... Dependency Error: Yikes! It looks like you don't have pygments or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- pygments' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! Liquid Exception: pygments in C:/ruby217/lib/ruby/gems/2.1.0/gems/jekyll-docs-3.1.1/site/_docs/assets.md ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ Pygments來做

所以,我打開_config.yml(有在文件的最後列出了我上面安裝的那兩個寶石。我應該先打開_config.yml),改變了這一行...

熒光筆:Pygments來做

到..

熒光筆:胭脂

因爲胭脂已經在系統上安裝。之後,我跑...

jekyll serve

和瞧。有效。

結論:所需的依賴關係不能正確解析。

+0

有趣。我的配置中沒有任何插件,分頁插件將是我的第一個插件,但尚未添加到配置中,因爲我試圖讓網站按照第一個方式構建。 –

0

所以,另一個地方的朋友給我回答了這個問題!

我有一個帖子,是以下slu::25和傑基爾根本不喜歡那個,我把它改成了二十五,這一切都很好!

希望這可以幫助別人:)