Mostrar / Ocultar Avisos

Rails Rake Task for Resetting Your Database

The code below was given to me by Jonathan Viney when we worked on a Rails project together last summer and I’ve found it very useful. It is a rake task that will drop your developement dB and restore it based on your migrations and test fixtures. And as a good Rails developer I’m assuming you are using both.

Ugh.  I really need to find the bug killing my formatting in the SyntaxHighlighter.

One Response

  1. Sam Says:

    With Rails 2.0 there is a new Rake task that does most of this for you.

    > rake db:reset

    This task will drop the db, recreate the db, and then run the migrations. It doesn’t reload your fixtures though.

Leave a Reply