Going back to Hobo 1.0.3 has things working again. On Friday, October 5, 2012 3:13:15 AM UTC+10, Bryan Larsen wrote: > > Can you try downgrading to Hobo 1.0? Hobo 1.1 was kind of a dead end -- > it was released simultaneously with Hobo 1.3 so wasn't widely used. And > the area of code that you're highlighting is the biggest difference between > 1.0 & 1.1. > > cheers, > Bryan > > > On Thu, Oct 4, 2012 at 12:43 PM, Dean <[email protected]<javascript:> > > wrote: > >> I've done a bit of tracing on this and tracked the problem down the >> following code in dryml/template_handler.rb >> >> class ActionView::Template >> >> def render_with_dryml(view, local_assigns = {}) >> if handler == Dryml::TemplateHandler >> render_dryml(view, local_assigns) >> else >> render_without_dryml(view, local_assigns) >> end >> end >> alias_method_chain :render, :dryml >> >> The weird thing is that handler == Dryml::TemplateHandler evaluates as >> true on the first render, but evaluates to false on all subsequent renders >> - even though, according to the debugger, the handler method returns >> Dryml::TemplateHandler each time. >> >> Even more confusing is that the debugger reckons that the expression >> evaluates to false on the second render. >> >> The only difference I can see is that as handler is memoized, the first >> call calls the method whereas the second call returns the cached result. >> However, the debugger says that the memoized value of handler is a class of >> Dryml::TemplateHandler >> >> >> <https://lh6.googleusercontent.com/-6-MxfgvlaCg/UG25ty9V3UI/AAAAAAAAADg/jcyeq5AIv0Q/s1600/snapshot1.png> >> >> >> >> Possibly it is something to do with my environment? >> >> $ gem list >> >> *** LOCAL GEMS *** >> >> actionmailer (2.3.14) >> actionpack (2.3.14) >> activerecord (2.3.14) >> activeresource (2.3.14) >> activesupport (2.3.14) >> dryml (1.1.0) >> hobo (1.1.0) >> hobofields (1.1.0) >> hobosupport (1.1.0) >> mysql (2.8.1) >> rack (1.1.3) >> rails (2.3.14) >> rake (0.9.2.2) >> sqlite3 (1.3.6) >> validates_existence (0.5.2) >> will_paginate (2.3.15) >> >> $ ruby -v >> ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] >> >> Any ideas? >> >> Dean >> >> >> >> On Thursday, September 6, 2012 11:03:55 AM UTC+10, Bryan Larsen wrote: >> >>> Wow, that's weird. According to your backtrace, it appears to be >>> thinking that your file isn't DRYML. Once it's made that decision, >>> it's not surprising that it's going to die horribly. >>> >>> Would it be possible for you to send me a tarball so I can dive into >>> your code? >>> >>> cheers, >>> Bryan >>> >>> >>> On Wed, Sep 5, 2012 at 8:54 PM, Dean <[email protected]> wrote: >>> > I'm doing some maintenance on an old Hobo 1.0.1 application and as >>> part of >>> > the process bringing it up to 1.1.0. In trying to get the development >>> > environment running I've run up against a weird problem - the first >>> page >>> > load works fine but all subsequent pages fail, including the >>> successful page >>> > if I reload it. If I restart webbrick then I can load another page >>> but >>> > again all subsequent requests fail. >>> > >>> > The error reported is: >>> > >>> > Processing SitesController#show (for 127.0.0.1 at 2012-09-06 09:51:04) >>> [GET] >>> > Parameters: {"controller"=>"sites", "action"=>"show", >>> "id"=>"419-nad034"} >>> > Site Load (0.8ms) SELECT * FROM `sites` WHERE (`sites`.`id` = 419) >>> ORDER >>> > BY `sites`.code >>> > SQL (0.7ms) SHOW TABLES >>> > Rendering sites/show >>> > >>> > ActionView::TemplateError (wrong number of arguments (2 for 1)) on >>> line #1 >>> > of app/views/sites/show.dryml: >>> > 1: <show-page> >>> > 2: <append-scripts:> >>> > 3: <%= GMap.header %> >>> > 4: </append-scripts:> >>> > >>> > app/views/sites/show.dryml:1:**in `render' >>> > app/views/sites/show.dryml:1:**in >>> > `_run_dryml_**app47views47sites47show46dryml**' >>> > dryml (1.1.0) lib/dryml/template_handler.rb:**108:in `render' >>> > dryml (1.1.0) lib/dryml/template_handler.rb:**83:in >>> `render_for_file' >>> > hobo (1.1.0) lib/hobo/model_controller.rb:**821:in `render' >>> > hobo (1.1.0) lib/hobo/controller.rb:23:in `call' >>> > hobo (1.1.0) lib/hobo/controller.rb:23:in `included_in_class' >>> > /usr/lib/ruby/1.8/webrick/**httpserver.rb:104:in `service' >>> > /usr/lib/ruby/1.8/webrick/**httpserver.rb:65:in `run' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:173:in `start_thread' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:162:in `start' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:162:in `start_thread' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:95:in `start' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:92:in `each' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:92:in `start' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:23:in `start' >>> > /usr/lib/ruby/1.8/webrick/**server.rb:82:in `start' >>> > >>> > >>> > I have updated all of the gems to 1.1.0 and their dependencies but >>> haven't >>> > modified any of the 1.0.1 code yet. >>> > >>> > I'm pretty stumped by this. Any suggestions where to start looking? >>> > >>> > Thanks, >>> > >>> > Dean >>> > >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Hobo Users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/hobousers/-/wnTDl322bLAJ. >> >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/hobousers?hl=en. >> > >
-- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/hobousers/-/6r0azgQbB2YJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
