Running a Rails development firm is great because...
4 comments Latest by Jeremy Voorhis Fri, 24 Feb 2006 05:13:39 GMT
you can find yourself saying, “boy, I sure wish that X could do Y.”
15 minutes later… you find that one of your developers has created a solution and then contributed it as a patch to the Rails project.
./script/console
>> reset!
=> []
Yes… this is just a short-cut to Dispatcher.reset_application!
... but it’s saving me a whole 24 characters each time I need to reset my application while hanging out in script/console
.
Thanks Jeremy!
I prefer the short form,
r!
OK, say I’ve got script/server running, and I make a change to enviroment.rb. Does this reset only affect script/console, or will it also change what’s going on in script/server?
great tip, thanks
Phil,
You can certainly call this from
script/server
, but we really just wanted a friendly way to reload the app fromscript/console
. This is just a wrapper toDispatcher.reset_application!
which – as far as I understand – should not affect environment.rb. An olde-fashionedCtrl-C up return
is still required for that. I’m sure you’ve got the reflex by now ;)