1 Mar 2011 01:05
Re: erb example from comp.lang.ruby fails
RichardOnRails <RichardDummyMailbox58407 <at> USComputerGurus.com>
2011-03-01 00:05:30 GMT
2011-03-01 00:05:30 GMT
On Feb 28, 2:38 pm, Sean O'Halpin <sean.ohal... <at> gmail.com> wrote: > On Mon, Feb 28, 2011 at 7:00 PM, RichardOnRails > > > > <RichardDummyMailbox58... <at> uscomputergurus.com> wrote: > > I copied code fromhttp://www.ruby-doc.org/stdlib-1.8.6/(erb package > > in Table of Contents, ERB in Classes column. > > > I edited it only slightly in SciTE and pasted it inhttp://www.pastie.org/1617782 > > > Running the code from within SciTE 1.74 gave me the error message: > > (erb):16: undefined local variable or method `priority' for > > main:Object (NameError) > > from K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/1.8/erb.rb:741:in > > `value' > > from K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/1.8/erb.rb:741:in > > `result' > > from erb1.rb:43 > > > I'm running ruby 1.8.6 under WinXP-Pro/SP3 > > > If there's a easily recognized fix, I'd like to apply it to this > > example. Meanwhile, I'll try other examples that might both work and > > suggest a hint at why this example fails. > > > Thanks in Advance, > > Richard > > That ".gsub(/^ /, '')" at the end of the template is the clue. It(Continue reading)
RSS Feed