Rails Rake Task for Resetting Your Database
- 13th June , 2007 by Sam in Ruby on Rails
- 1 comment
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.


October 22nd, 2007 at 12:52 pm
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.