8000 undefined method `length' for nil:NilClass (NoMethodError) · Issue #19 · zroger/jekyll-minimagick · GitHub
[go: up one dir, main page]

Skip to content
Dismiss alert

undefined method `length' for nil:NilClass (NoMethodError) #19

Open

Description

@maxvoltar

[warning: noob] Have a pretty vanilla Jekyll that was running fine until I tried adding jekyll-minimagick. Here's the error I keep bumping into:

1: from /Users/tim/.rvm/gems/ruby-2.6.3/gems/jekyll-4.0.0/lib/jekyll/static_file.rb:161:in `url' /Users/tim/.rvm/gems/ruby-2.6.3/gems/jekyll-4.0.0/lib/jekyll/static_file.rb:148:in `cleaned_relative_path': undefined method `length' for nil:NilClass (NoMethodError)

Files I've changed:

  • Created _plugins/bundler.rb
  • Created _plugins/my-plugin.rb
  • Added gem "jekyll-minimagick" to :jekyll_plugins in my Gemfile
  • Added this bit to the bottom of _config.yml:
mini_magick:
  thumbnail:
    source: photos/original
    destination: photos/thumbnail
    resize: "640x640"
  tint:
    source: photos/original
    destination: photos/tint
    resize: "1x1"

Anyone has any thoughts? Is this a bug or human error?

Activity

  1. dasrecht commented on Mar 17, 2020

    @dasrecht

    Ran into similar issues and switched to https://github.com/MattKevan/Jekyll-MiniMagick-new which i first thought will work but running into similar issues atm

  2. FinnLawrence commented on Feb 23, 2022

    @FinnLawrence

    Leaving a comment here for future visitors - I had the same issue and ha a decent attempt at trying to debug it.
    Didn't have any luck with a solution but my hunch was that it's related to the file type/extension not being set correctly on the generated images, which is causing the issue in static_file.rb.

    I tried the above linked package which worked perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0