---------------------------------------------------------------------------
The Loquacious configuration system has detected that one or moe
settings have an undefined value. An attempt is being made to reference
sub-properties of these undefined settings. Messages will follow containing
information about the undefined properties.
---------------------------------------------------------------------------
Access to undefined value "gnuplot": gnuplot.[]
Access to undefined value "gnuplot": gnuplot.[]
This happens when I use the gnuplot filter, but it also happens with the
graphviz filter in the example that comes with webby. However, the
filter runs normally.
Here's where it happens:
def gnuplot( *args, &block )
opts = args.last.instance_of?(Hash) ? args.pop : {}
text = capture_erb(&block)
return if text.empty?
defaults = ::Webby.site.gnuplot || {}
# ^^^ this leads to method_missing
Is there some way to register the gnuplot key so that Loquatious is happier?
Also, how do you access things in the Sitefile now. The old syntax
SITE.key1.key2 = val
doesn't seem to work.
>
> I'm getting this warning
>
> ---------------------------------------------------------------------------
> The Loquacious configuration system has detected that one or moe
> settings have an undefined value. An attempt is being made to reference
> sub-properties of these undefined settings. Messages will follow containing
> information about the undefined properties.
> ---------------------------------------------------------------------------
> Access to undefined value "gnuplot": gnuplot.[]
> Access to undefined value "gnuplot": gnuplot.[]
>
> This happens when I use the gnuplot filter, but it also happens with the graphviz filter in the example that comes with webby. However, the filter runs normally.
>
> Here's where it happens:
>
> def gnuplot( *args, &block )
> opts = args.last.instance_of?(Hash) ? args.pop : {}
>
> text = capture_erb(&block)
> return if text.empty?
>
> defaults = ::Webby.site.gnuplot || {}
> # ^^^ this leads to method_missing
>
defaults = ::Webby.site.gnuplot.nil? ? {} : ::Weby.site.gnuplot
The Loquacious configuration system assigns an undefined object as the default value for all unknown configuration options (an instance of Loquacious::Undefined). This object is what is printing out the messages. In ruby only "false" and "nil" are falsey; everything else is true by default. So the Loquacious::Undefined instances are true, and the compromise that Loquacious makes is to have the "nil?" method always return true.
>
> Is there some way to register the gnuplot key so that Loquatious is happier?
>
> Also, how do you access things in the Sitefile now. The old syntax
>
> SITE.key1.key2 = val
Webby.site.key1 {
key2 val
}
Again, the Loquacious configuration system dictates this structure. If you read up on the Loquacious documentation / source code you'll see why. I'll leave that as an exercise for the reader ;)
Blessings,
TwP