Ticket #141 (new defect)

Opened 13 months ago

Last modified 4 months ago

For some reason @root and related instance variables become nil in helpers

Reported by: mst Owned by: why
Priority: major Milestone:
Component: bin/camping Version:
Keywords: Cc:

Description

So I'm getting errors like this:

NoMethodError undefined method `+' for nil:NilClass:

    * (eval):7:in `/'
    * (eval):7:in `URL'

With some poking around I found that @root, @env etc are nil in the Helpers module.

Change History

Changed 13 months ago by mst

Uploading patches is still broken. Alas.

Index: lib/camping.rb
===================================================================
--- lib/camping.rb      (revision 214)
+++ lib/camping.rb      (working copy)
@@ -4,7 +4,7 @@
 (g-=h).inject(c.urls.find{|x|x.scan(p).size==g.size}.dup){|s,a|s.sub p,C.
 escape((a[a.class.primary_key]rescue a))}+(h.any?? "?"+h[0].map{|x|x.map{|z|C.
 escape z}*"="}*"&": "")end;def URL c='/',*a;c=R(c,*a)if c.respond_to?:urls
-c=self/c;c="//"+@env.HTTP_HOST+c if c[/^\//];URI(c)end;def/p;p[/^\//]?@root+p :
+c=self/c;c="//"+env.HTTP_HOST+c if c[/^\//];URI(c)end;def/p;p[/^\//]?root+p :
 p end;def errors_for o;ul.errors{o.errors.each_full{|x|li x}}if o.errors.any?end
 end;module Base;attr_accessor:input,:cookies,:env,:headers,:body,
 :status,:root;def method_missing*a,&b;a.shift if a[0]==:render;m=Mab.new({},self)

Changed 13 months ago by mst

Alright, this might have something to do with being on markaby-trunk. I'll have to investigate further. First more sleeps.

Changed 4 months ago by judofyr

Is this still open? How can we reproduce it?

Note: See TracTickets for help on using tickets.