Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

Running a Rails development firm is great because...

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

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.

>> 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!

Get help with your Rails project

comments powered by Disqus

Leave a response

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

    I prefer the short form, r!

  2. Avatar
    Phil Thu, 23 Feb 2006 16: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 22:59:20 GMT

    great tip, thanks

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


    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 ;)