cDlm has quit [Read error: Connection reset by peer]
cDlm has joined #nanoc
<guardian>
o
<guardian>
o/
david_ has joined #nanoc
<david_>
Hi guys
<david_>
I could use some help troubleshooting a Nanoc issue I'm having
<david_>
When I try to compile my (previously working) site, Nanoc drops out with an error message: "NoMethodError: undefined method `downcase' for nil:NilClass"
<david_>
Nothing was changes to the Nanoc install, I just a few new blog posts.
<david_>
Apparently it breaks on these statements in my Rules file:
<david_>
route '/assets/*/', :rep => :thumbnail do case item[:extension].downcase when 'jpg', 'gif', 'png', 'bmp' item.identifier.chop + ' thumb.' + item[:extension].downcase end end
<david_>
So I believe it finds an item in /assets/*/, for which it can't get the proper attributes (filename, extension). But I don't know what item that would be.
<david_>
Anyone have any idea how I can find out?
<ddfreyne>
david_: You probably have an item without an extension
<david_>
Yes and in the meantime I found it as well, it was the Rules file
<ddfreyne>
if item[:extension] is nil, then calling #downcase on it cause that error
<david_>
It took me some time to find though
<david_>
Is there a reference to the item Nanoc crashes on somewhere? I couldn't find it in the crash log...
<ddfreyne>
david_: The backtrace usually has the item name
<david_>
You mean the crash output to the console? This didn't have any reference to the item.
<ddfreyne>
david_: Hmm, it might not have one
<david_>
That does make for some cumbersome troubleshooting...