Ticket #137 (closed defect: fixed)

Opened 16 months ago

Last modified 15 months ago

SVN Broken

Reported by: archengule Owned by: somebody
Priority: blocker Milestone:
Component: camping.rb Version:
Keywords: Cc:

Description

As of revision 194:
bin/camping needs lib/camping/server/{mongrel,webrick,..} from #117.
After the patch is applied, the TheCampingServer will start, but apps won't be served properly.
Instead you get " NoMethodError? undefined method `capture' ", which comes from the call to render {somepage}.
Replacing camping.rb with camping-unabridged.rb, oddly enough, seems to fix the problem.

Change History

Changed 16 months ago by mst

I'm guessing it has something to do with the Ruby parser changing. Anyway, I've attached a patch that solves it for me.

Changed 16 months ago by mst

Hmm, patch upload seems to be broken. Here in the patch in plain text:

Index: lib/camping.rb
===================================================================
--- lib/camping.rb	(revision 195)
+++ lib/camping.rb	(working copy)
@@ -7,7 +7,7 @@
 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;include Helpers;attr_accessor:input,:cookies,:env,:headers,:body,
-:status,:root;def method_missing*a,&b;a.shift if a[0]==:render;m=Mab.new {},self
+:status,:root;def method_missing*a,&b;a.shift if a[0]==:render;m=Mab.new({},self)
 s=m.capture{send(*a,&b)};s=m.capture{send(:layout){s}} if /^_/!~a[0].to_s and m.
 respond_to?:layout;s end;def r s,b,h={};@status=s;@headers.merge!h;@body=b end
 def redirect*a;r 302,'','Location'=>URL(*a)end;Z="\r\n";def to_a;[@status,@body,

Changed 16 months ago by archengule

Solves it for me too.

Changed 15 months ago by zimbatm

  • status changed from new to closed
  • resolution set to fixed

Okay, added to SVN revision [200] !

Note: See TracTickets for help on using tickets.