Image Source: blogs.sun.com

Rake is a utility which is the same with Make in Unix. Rake is the Make of ruby or the Ruby Make. Luckily, Rails defines many tasks to help you. Some of the important commands which are supported by Ruby’s rake is

listed below;

  • rake db:fixtures:load - Load fixtures into the current environment’s database.
  • rake db:migrate - Migrate the database through scripts in db/migrate.
  • rake db:schema:dump - Create a db/schema.rb file that can be used against any DB.
  • rake db:schema:load - Load a schema.rb file into the database.
  • rake db:sessions:clear - Clear the sessions table.
  • rake db:sessions:create - Creates a sessions table for use with
    “CGI::Session::ActiveRecordStore”.
  • rake db:structure:dump - Dump the database structure to an SQL file.
  • rake db:test:clone - Recreate the test database from the current environment’s database.
  • rake db:test:clone_structure - Recreate the test databases from the development structure.
  • rake db:test:prepare - Prepare the test database and load the schema.
  • rake db:test:purge - Empty the test database.
  • rake doc:app -Build the app HTML Files.
  • rake doc:clobber_app - Remove rdoc products.
  • rake doc:clobber_plugins - Remove plugin documentation.
  • rake doc:clobber_rails - Remove rdoc products.
  • rake doc:plugins - Generate documation for all installed plugins.