rake 命令
[root@ford depot]# rake --task(或者rake -T)(in /home/xxxx/rails/depot)rake db:abort_if_pending_migrations?????? # Raises an error if there are pending migrationsrake db:charset?????????????????????????? # Retrieves the charset for the current environment's databaserake db:collation???????????????????????? # Retrieves the collation for the current environment's databaserake db:create??????????????????????????? # Create the database defined in config/database.yml for the current RAILS_ENVrake db:create:all??????????????????????? # Create all the local databases defined in config/database.ymlrake db:drop????????????????????????????? # Drops the database for the current RAILS_ENVrake db:drop:all????????????????????????? # Drops all the local databases defined in config/database.ymlrake db:fixtures:identify???????????????? # Search for a fixture given a LABEL or ID.rake db:fixtures:load???????????????????? # Load fixtures into the current environment's database.rake db:migrate?????????????????????????? # Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version w...rake db:migrate:down????????????????????? # Runs the "down" for a given migration VERSION.rake db:migrate:redo????????????????????? # Rollbacks the database one migration and re migrate up.rake db:migrate:reset???????????????????? # Resets your database using your migrations for the current environmentrake db:migrate:up??????????????????????? # Runs the "up" for a given migration VERSION.rake db:reset???????????????????????????? # Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.rake db:rollback????????????????????????? # Rolls the schema back to the previous version.rake db:schema:dump?????????????????????? # Create a db/schema.rb file that can be portably used against any DB supported by ARrake db:schema:load?????????????????????? # Load a schema.rb file into the databaserake db:seed????????????????????????????? # Load the seed data from db/seeds.rbrake db:sessions:clear??????????????????? # Clear the sessions tablerake db:sessions:create?????????????????? # Creates a sessions migration for use with ActiveRecord::SessionStorerake db:setup???????????????????????????? # Create the database, load the schema, and initialize with the seed datarake db:structure:dump??????????????????? # Dump the database structure to a SQL filerake db:test:clone??????????????????????? # Recreate the test database from the current environment's database schemarake db:test:clone_structure????????????? # Recreate the test databases from the development structurerake db:test:load???????????????????????? # Recreate the test database from the current schema.rbrake db:test:prepare????????????????????? # Check for pending migrations and load the test schemarake db:test:purge??????????????????????? # Empty the test databaserake db:version?????????????????????????? # Retrieves the current schema version numberrake doc:app????????????????????????????? # Build the RDOC HTML Filesrake doc:clobber_app????????????????????? # Remove rdoc productsrake doc:clobber_plugins????????????????? # Remove plugin documentationrake doc:clobber_rails??????????????????? # Remove rdoc productsrake doc:guides?????????????????????????? # Generate Rails guidesrake doc:plugins????????????????????????? # Generate documentation for all installed pluginsrake doc:rails??????????????????????????? # Build the RDOC HTML Filesrake doc:reapp??????????????????????????? # Force a rebuild of the RDOC filesrake doc:rerails????????????????????????? # Force a rebuild of the RDOC filesrake gems???????????????????????????????? # List the gems that this rails application depends onrake gems:build?????????????????????????? # Build any native extensions for unpacked gemsrake gems:build:force???????????????????? # Force the build of all gemsrake gems:install???????????????????????? # Installs all required gems.rake gems:refresh_specs?????????????????? # Regenerate gem specifications in correct format.rake gems:unpack????????????????????????? # Unpacks all required gems into vendor/gems.rake gems:unpack:dependencies???????????? # Unpacks all required gems and their dependencies into vendor/gems.rake log:clear??????????????????????????? # Truncates all *.log files in log/ to zero bytesrake middleware?????????????????????????? # Prints out your Rack middleware stackrake notes??????????????????????????????? # Enumerate all annotationsrake notes:custom???????????????????????? # Enumerate a custom annotation, specify with ANNOTATION=WTFHAXrake notes:fixme????????????????????????? # Enumerate all FIXME annotationsrake notes:optimize?????????????????????? # Enumerate all OPTIMIZE annotationsrake notes:todo?????????????????????????? # Enumerate all TODO annotationsrake rails:freeze:edge??????????????????? # Lock to latest Edge Rails, for a specific release use RELEASE=1.2.0rake rails:freeze:gems??????????????????? # Lock this application to the current gems (by unpacking them into vendor/rails)rake rails:template?????????????????????? # Applies the template supplied by LOCATION=/path/to/templaterake rails:unfreeze?????????????????????? # Unlock this application from freeze of gems or edge and return to a fluid use of system gemsrake rails:update???????????????????????? # Update both configs, scripts and public/javascripts from Railsrake rails:update:application_controller? # Rename application.rb to application_controller.rbrake rails:update:configs???????????????? # Update config/boot.rb from your current rails installrake rails:update:generate_dispatchers??? # Generate dispatcher files in RAILS_ROOT/publicrake rails:update:javascripts???????????? # Update your javascripts from your current rails installrake rails:update:scripts???????????????? # Add new scripts to the application script/ directoryrake routes?????????????????????????????? # Print out all defined routes in match order, with names.rake secret?????????????????????????????? # Generate a crytographically secure secret key.rake stats??????????????????????????????? # Report code statistics (KLOCs, etc) from the applicationrake test???????????????????????????????? # Run all unit, functional and integration testsrake test:benchmark?????????????????????? # Run tests for benchmarkdb:test:prepare / Benchmark the performance testsrake test:functionals???????????????????? # Run tests for functionalsdb:test:prepare / Run the functional tests in test/functionalrake test:integration???????????????????? # Run tests for integrationdb:test:prepare / Run the integration tests in test/integrationrake test:plugins???????????????????????? # Run tests for pluginsenvironment / Run the plugin tests in vendor/plugins/*/**/test (or specify with PLUGIN=name)rake test:profile???????????????????????? # Run tests for profiledb:test:prepare / Profile the performance testsrake test:recent????????????????????????? # Run tests for recentdb:test:prepare / Test recent changesrake test:uncommitted???????????????????? # Run tests for uncommitteddb:test:prepare / Test changes since last checkin (only Subversion and Git)rake test:units?????????????????????????? # Run tests for unitsdb:test:prepare / Run the unit tests in test/unitrake time:zones:all?????????????????????? # Displays names of all time zones recognized by the Rails TimeZone class, grouped by offset.rake time:zones:local???????????????????? # Displays names of time zones recognized by the Rails TimeZone class with the same offset as the system local timerake time:zones:us??????????????????????? # Displays names of US time zones recognized by the Rails TimeZone class, grouped by offset.rake tmp:cache:clear????????????????????? # Clears all files and directories in tmp/cacherake tmp:clear??????????????????????????? # Clear session, cache, and socket files from tmp/rake tmp:create?????????????????????????? # Creates tmp directories for sessions, cache, sockets, and pidsrake tmp:pids:clear?????????????????????? # Clears all files in tmp/pidsrake tmp:sessions:clear?????????????????? # Clears all files in tmp/sessionsrake tmp:sockets:clear??????????????????? # Clears all files in tmp/sockets
(借阅)
推荐url :http://leeyouser.iteye.com/blog/702601