rosario / kasper

Ghost's default theme (Casper v1.0) on Jekyll

Home Page:https://rosario.io/kasper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jekyll build error, Wrong Argument Type, Expected String

kweng2 opened this issue · comments

Configuration file: /Users/ziluweng/Documents/gitHub/kasper/_config.yml
Deprecation: You appear to have pagination turned on, but you haven't included the jekyll-paginate gem. Ensure you have gems: [jekyll-paginate] in your configuration file.
Source: /Users/ziluweng/Documents/gitHub/kasper
Destination: /Users/ziluweng/Documents/gitHub/kasper/_site
Incremental build: disabled. Enable with --incremental
Generating...
Deprecation: Collection#map should be called on the #docs array directly.
Called by /Users/ziluweng/Documents/gitHub/kasper/_plugins/rssgenerator.rb:46:in block in generate'. Deprecation: Collection#count should be called on the #docs array directly. Called by /Users/ziluweng/Documents/gitHub/kasper/_plugins/rssgenerator.rb:49:inrescue in block in generate'.
Deprecation: Collection#reverse should be called on the #docs array directly.
Called by /Users/ziluweng/Documents/gitHub/kasper/_plugins/rssgenerator.rb:51:in block in generate'. Deprecation: Document#title is now a key in the #data hash. Called by /Users/ziluweng/Documents/gitHub/kasper/_plugins/rssgenerator.rb:53:inblock (3 levels) in generate'.
Deprecation: Document#excerpt is now a key in the #data hash.
Called by /Users/ziluweng/Documents/gitHub/kasper/_plugins/rssgenerator.rb:55:in `block (3 levels) in generate'.
jekyll 3.0.1 | Error: wrong argument type Jekyll::Excerpt (expected String)
Zilus-MacBook-Pro:kasper ziluweng$ gem

I cloned the repo and ran jekyll serve, and ran into this issue that I'm stuck on. I solved the paginate problem by adding

gems:

  • jekyll-paginate

But still gives the last error

Hey, It could be related to a newer version of Ruby/Jekyll you might be using.

Patches welcome ;)

Facing the same problem, with a fresh clone of Kasper.

With a simple jekyll-server:

$ jekyll serve
Configuration file: /private/tmp/kasper/_config.yml
            Source: /private/tmp/kasper
       Destination: /private/tmp/kasper/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Deprecation: Collection#map should be called on the #docs array directly.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:46:in `block in generate'.
       Deprecation: Collection#count should be called on the #docs array directly.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:49:in `rescue in block in generate'.
       Deprecation: Collection#reverse should be called on the #docs array directly.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:51:in `block in generate'.
       Deprecation: Document#title is now a key in the #data hash.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:53:in `block (3 levels) in generate'.
       Deprecation: Document#excerpt is now a key in the #data hash.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:55:in `block (3 levels) in generate'.
jekyll 3.0.1 | Error:  wrong argument type Jekyll::Excerpt (expected String)

I've tried changing line 55 from:

item.description = parser.convert(post.excerpt)

To:

item.description = 'Whatever' #parser.convert(post.excerpt)

And then I get:

 $ jekyll serve
Configuration file: /private/tmp/kasper/_config.yml
            Source: /private/tmp/kasper
       Destination: /private/tmp/kasper/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Deprecation: Collection#map should be called on the #docs array directly.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:46:in `block in generate'.
       Deprecation: Collection#count should be called on the #docs array directly.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:49:in `rescue in block in generate'.
       Deprecation: Collection#reverse should be called on the #docs array directly.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:51:in `block in generate'.
       Deprecation: Document#title is now a key in the #data hash.
                    Called by /private/tmp/kasper/_plugins/rssgenerator.rb:53:in `block (3 levels) in generate'.
  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 /private/tmp/kasper/_posts/2013-11-10-welcome-to-jekyll.markdown
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    pygments

I've tried both gem install jekyll-pygments and gem install pygments, with no luck.

I managed to solve this error by removing _plugins/rssgenerator.rb and using the default feed.xml which comes by default when you do a jekyll new ...

Simply run: jekyll s --safe. This should ignore broken dependencies.

The error was indeed coming from _plugins/rssgenerator.rb. Looking at the author's comment: https://github.com/agelber/jekyll-rss the new Jekyll comes with a feed.xml and they suggest to use the default one.

I've included the default feed.xml which comes with the standard jekyll new template and removed the old rssgenerator.rb.