Read my latest article: Six days to complete the Rails hosting survey (posted Thu, 24 Apr 2014 14:36:00 GMT)

Running a Rails development firm is great because...

Posted by Thu, 23 Feb 2006 03:07:00 GMT

4 comments Latest by Jeremy Voorhis Fri, 24 Feb 2006 06: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!

Subscribe to my RSS feed Enjoying the content? Be sure to subscribe to my RSS feed.
comments powered by Disqus
Comments

Leave a response

  1. Avatar
    Jeremy Voorhis Thu, 23 Feb 2006 03:41:31 GMT

    I prefer the short form, r!

  2. Avatar
    Phil Thu, 23 Feb 2006 17:29:10 GMT

    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?

  3. Avatar
    kim Thu, 23 Feb 2006 23:59:20 GMT

    great tip, thanks

  4. Avatar
    Jeremy Voorhis Fri, 24 Feb 2006 06:13:39 GMT

    Phil,

    You can certainly call this from script/server, but we really just wanted a friendly way to reload the app from script/console. This is just a wrapper to Dispatcher.reset_application! which – as far as I understand – should not affect environment.rb. An olde-fashioned Ctrl-C up return is still required for that. I’m sure you’ve got the reflex by now ;)