Rake Management and Building Tool
Rake stands for Ruby + Make. It is used in Ruby on Rails the same way Make is used in Unix. Rake utility uses a “Rakefile” and .rake in order to come up with the list of tasks that utility needs to execute. In Ruby on Rails, Rake in used for administrative tasks and it is categorized as software task management and building tool. In order to see this list of tasks, you can issue the following command
> rake --tasks
Here is a list of tasks and brief description of each
- > rake about # Provides you with version of your Ruby, RubyGems, Rails and its subcomponents.
- > rake assets:clean[keep] # Removs old assets wich were compiled
- > rake assets:clobber # Clears public/assets folder in its entirety
- > rake assets:environment # Loads asset compile environment
- > rake assets:precompile # Precompiles assets in app/assets folder
- > rake cache_digests:dependencies # Looks for first-level dependencies for cache
- > rake cache_digests:nested_dependencies # Looks for nested dependencies
- > rake db:create # Common tasks for working with db and will create it
- > rake db:drop # Drops the database
- > rake db:fixtures:load # Loads fixtures into the current environment
- > rake db:migrate # Migrates the database
- > rake db:migrate:status # Display status of migrations
- > rake db:rollback # Rolls the database schema back to the previous version
- > rake db:schema:cache:clear # Clears a db/schema_cache.dump file
- > rake db:schema:cache:dump # Creates a db/schema_cache.dump file
- > rake db:schema:dump # Creates a db/schema.rb
- > rake db:schema:load # Loads a schema.rb file into the da...
- > rake db:seed # Loads the seed data from db/seeds.rb
- > rake db:setup # Create the database, and initializes it with sample or seed data
- > rake db:structure:dump # Dumps the database structure to db/stracture.sql file for your consumption
- > rake db:structure:load # Recreate the databases from the structure file
- > rake db:version # Retrieves the current schema version of the database
- > rake doc:app # Generate detailed docs for your application
- > rake log:clear # Truncates all *.log files in log/... folder under your project
- > rake middleware # Prints out your Rack middleware
- > rake notes # Searches through your code looking for FIXME, OPTIMIZE or TODO
- > rake notes:custom # Enumerate a custom annotation in your project
- > rake rails:template # Applies the template supplied by URL or Location
- > rake rails:update # Updates configs and some other initialization files
- > rake routes # Prints out all defined routes in your project. It sorts them in the order of the match
- > rake secret # Generate a secret key for cryptography
- > rake stats # Report code statistics such as KLOC for code analysis
- > rake test # Runs all code tests located in project test folder
- > rake test:all # Runs tests quickly via merging them together
- > rake test:all:db # Run tests quickly with db reset
- > rake test:db # Run tests quickly, but also reset db
- > rake time:zones:all # Displays all time zones
- > rake tmp:clear # Clears session, cache, and sockets
- > rake tmp:create # Creates tmp directories for session, cache, sockets and pids