Error on Build after 4.0.0 upgrade

After upgrading to Jekyll 4.0, I’m not getting the following error when trying to build my site:

/Users/me/.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)

I’m using bundler and have updated all the gems without issue.

The line under suspicion is:

cleaned = relative_path[0..-extname.length - 1]

which means extname is nil in your site.
extname is calculated via:

extname = File.extname(@name)

Based on the documentation for your Ruby version, File.extname always returns a string.

In other words, one of your plugins could be at fault. Please run the build again with --trace (i.e. bundle exec jekyll build --trace) and post the entire output here.

Sure:

   Configuration file: /Users/me/Development/my-site/_config.yml
            Source: /Users/me/Development/my-site
       Destination: /Users/me/Development/my-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
/Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/static_file.rb:148:in `cleaned_relative_path': undefined method `length' for nil:NilClass (NoMethodError)
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/static_file.rb:161:in `url'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/static_file.rb:58:in `destination'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:60:in `block (2 levels) in new_files'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:344:in `block (2 levels) in each_site_file'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:343:in `each'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:343:in `block in each_site_file'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:342:in `each'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:342:in `each_site_file'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:60:in `block in new_files'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:59:in `tap'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:59:in `new_files'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:25:in `obsolete_files'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/cleaner.rb:15:in `cleanup!'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:211:in `cleanup'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:77:in `process'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	from /Users/me/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
	from /Users/me/.rvm/gems/ruby-2.4.0/bin/jekyll:23:in `load'
	from /Users/me/.rvm/gems/ruby-2.4.0/bin/jekyll:23:in `<main>'
	from /Users/me/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in `eval'
	from /Users/me/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in `<main>'

I did some research into the issue and found other trace logs where the plugin folder was clearly identified and I don’t see that here. The only plugin I’m running is jekyll-minimagick.