Also, it takes a certain amount of time to reload... though I'm not
sure how long. It shouldn't be much more than 0.5 seconds, though that
is technically a random guess. :)
If you're still having problems, I'll take a look through the code to
make sure nothing is missing or broken a bit later.
Matt
I've been debugging for about an hour now... and for some reason @last
keeps getting updated to Time.now even though no code around it gets
executed...
Fucking baffled.
Still working on it.
Matt
You have to call #to_app on the end of the Rack::Builder block
otherwise the #initialize method for the Rack::Reloader (and other
classes, probably, but didn't check) gets run every single request.
So...
app = Rack::Builder.new do
use Rack::CommonLogger
use Rack::Reloader
use Rack::ShowExceptions
run HelloWorld.new
end.to_app
Is this a bug?
Matt
> Solved it.
>
> http://gist.github.com/10383
>
> You have to call #to_app on the end of the Rack::Builder block
> otherwise the #initialize method for the Rack::Reloader (and other
> classes, probably, but didn't check) gets run every single request.
>
> So...
>
> app = Rack::Builder.new do
> use Rack::CommonLogger
> use Rack::Reloader
> use Rack::ShowExceptions
> run HelloWorld.new
> end.to_app
>
> Is this a bug?
No.
But maybe there should be a Rack::Builder.make do..end that runs
to_app automatically.
> Matt
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org
For some reason I had thought that that was the default behavior.
Totally for it.
Matt
Matt