[MacRuby-devel] ControlTower/Rack question

Alexander v. Below below at mac.com
Wed Aug 25 13:07:34 PDT 2010


Hello,

if there is a better list to ask this question, please point me to it ...

I have a -- possibly silly -- question on ControlTower/Rack. I should admit that I am kinda new to this whole thing....

My rack script has something like this:

map '/foo' do
	$text = "foo"
	print $text
    run Proc.new {|env| [200, {"Content-Type" => "text/html"}, $text ] }
end

Now, it seems that this block is called immediately upon start, and the response is cached, i.e. it is not evaluated again when the resource /foo is actually read.

What am I doing wrong? I want the block to be executed everytime that /foo is accessed.

Thanks

Alex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100825/7296e7ed/attachment.html>


More information about the MacRuby-devel mailing list