rake --helpとrake -Tの実行結果

[参考記事] rakeのタスク一覧

rake --help

rake [-f rakefile] {options} targets...

Options are ...
    -C, --classic-namespace          Put Task and FileTask in the top level namespace
    -D, --describe [PATTERN]         Describe the tasks (matching optional PATTERN), then exit.
    -n, --dry-run                    Do a dry run without executing actions.
    -e, --execute CODE               Execute some Ruby code and exit.
    -p, --execute-print CODE         Execute some Ruby code, print the result, then exit.
    -E, --execute-continue CODE      Execute some Ruby code, then continue with normal task processing.
    -I, --libdir LIBDIR              Include LIBDIR in the search path for required modules.
    -P, --prereqs                    Display the tasks and dependencies, then exit.
    -q, --quiet                      Do not log messages to standard output.
    -f, --rakefile [FILE]            Use FILE as the rakefile.
    -R, --rakelibdir RAKELIBDIR      Auto-import any .rake files in RAKELIBDIR. (default is 'rakelib')
        --rakelib
    -r, --require MODULE             Require MODULE before executing rakefile.
        --rules                      Trace the rules resolution.
    -N, --no-search, --nosearch      Do not search parent directories for the Rakefile.
    -s, --silent                     Like --quiet, but also suppresses the 'in directory' announcement.
    -g, --system                     Using system wide (global) rakefiles (usually '~/.rake/*.rake').
    -G, --no-system, --nosystem      Use standard project Rakefile search paths, ignore system wide rakefiles.
    -T, --tasks [PATTERN]            Display the tasks (matching optional PATTERN) with descriptions, then exit.
    -t, --trace                      Turn on invoke/execute tracing, enable full backtrace.
    -v, --verbose                    Log message to standard output.
    -V, --version                    Display the program version.
    -h, -H, --help                   Display this help message.

rake -T

rake db:abort_if_pending_migrationsRaises an error if there are pending migrations
rake db:charsetRetrieves the charset for the current environment's database
rake db:collationRetrieves the collation for the current environment's database
rake db:createCreate the database defined in config/database.yml for the current RAILS_ENV
rake db:create:allCreate all the local databases defined in config/database.yml
rake db:dropDrops the database for the current RAILS_ENV
rake db:drop:allDrops all the local databases defined in config/database.yml
rake db:fixtures:identifySearch for a fixture given a LABEL or ID. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures.
rake db:fixtures:loadLoad fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z. Specify an alternative path (eg. spec/fixtures) using FIXTURES_PATH=spec/fixtures.
rake db:migrateMigrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false.
rake db:migrate:downRuns the "down" for a given migration VERSION.
rake db:migrate:redoRollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.
rake db:migrate:resetResets your database using your migrations for the current environment
rake db:migrate:upRuns the "up" for a given migration VERSION.
rake db:resetDrops and recreates the database from db/schema.rb for the current environment and loads the seeds.
rake db:rollbackRolls the schema back to the previous version. Specify the number of steps with STEP=n
rake db:schema:dumpCreate a db/schema.rb file that can be portably used against any DB supported by AR
rake db:schema:loadLoad a schema.rb file into the database
rake db:seedLoad the seed data from db/seeds.rb
rake db:sessions:clearClear the sessions table
rake db:sessions:createCreates a sessions migration for use with ActiveRecord::SessionStore
rake db:setupCreate the database, load the schema, and initialize with the seed data
rake db:structure:dumpDump the database structure to a SQL file
rake db:test:cloneRecreate the test database from the current environment's database schema
rake db:test:clone_structureRecreate the test databases from the development structure
rake db:test:loadRecreate the test database from the current schema.rb
rake db:test:prepareCheck for pending migrations and load the test schema
rake db:test:purgeEmpty the test database
rake db:versionRetrieves the current schema version number
rake doc:appBuild the RDOC HTML Files
rake doc:clobber_appRemove rdoc products
rake doc:clobber_pluginsRemove plugin documentation
rake doc:clobber_railsRemove rdoc products
rake doc:guidesGenerate Rails guides
rake doc:pluginsGenerate documentation for all installed plugins
rake doc:railsBuild the RDOC HTML Files
rake doc:reappForce a rebuild of the RDOC files
rake doc:rerailsForce a rebuild of the RDOC files
rake gemsList the gems that this rails application depends on
rake gems:buildBuild any native extensions for unpacked gems
rake gems:build:forceForce the build of all gems
rake gems:installInstalls all required gems.
rake gems:refresh_specsRegenerate gem specifications in correct format.
rake gems:unpackUnpacks all required gems into vendor/gems.
rake gems:unpack:dependenciesUnpacks all required gems and their dependencies into vendor/gems.
rake log:clearTruncates all *.log files in log/ to zero bytes
rake middlewarePrints out your Rack middleware stack
rake notesEnumerate all annotations
rake notes:customEnumerate a custom annotation, specify with ANNOTATION=WTFHAX
rake notes:fixmeEnumerate all FIXME annotations
rake notes:optimizeEnumerate all OPTIMIZE annotations
rake notes:todoEnumerate all TODO annotations
rake rails:freeze:edgeLock to latest Edge Rails, for a specific release use RELEASE=1.2.0
rake rails:freeze:gemsLock this application to the current gems (by unpacking them into vendor/rails)
rake rails:templateApplies the template supplied by LOCATION=/path/to/template
rake rails:unfreezeUnlock this application from freeze of gems or edge and return to a fluid use of system gems
rake rails:updateUpdate both configs, scripts and public/javascripts from Rails
rake rails:update:application_controllerRename application.rb to application_controller.rb
rake rails:update:configsUpdate config/boot.rb from your current rails install
rake rails:update:generate_dispatchersGenerate dispatcher files in RAILS_ROOT/public
rake rails:update:javascriptsUpdate your javascripts from your current rails install
rake rails:update:scriptsAdd new scripts to the application script/ directory
rake routesPrint out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.
rake secretGenerate a crytographically secure secret key.
rake statsReport code statistics (KLOCs, etc) from the application
rake testRun all unit, functional and integration tests
rake test:benchmarkRun tests for benchmarkdb:test:prepare / Benchmark the performance tests
rake test:functionalsRun tests for functionalsdb:test:prepare / Run the functional tests in test/functional
rake test:integrationRun tests for integrationdb:test:prepare / Run the integration tests in test/integration
rake test:pluginsRun tests for pluginsenvironment / Run the plugin tests in vendor/plugins/*/**/test (or specify with PLUGIN=name)
rake test:profileRun tests for profiledb:test:prepare / Profile the performance tests
rake test:recentRun tests for recentdb:test:prepare / Test recent changes
rake test:uncommittedRun tests for uncommitteddb:test:prepare / Test changes since last checkin (only Subversion and Git)
rake test:unitsRun tests for unitsdb:test:prepare / Run the unit tests in test/unit
rake time:zones:allDisplays names of all time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6
rake time:zones:localDisplays names of time zones recognized by the Rails TimeZone class with the same offset as the system local time
rake time:zones:usDisplays names of US time zones recognized by the Rails TimeZone class, grouped by offset. Results can be filtered with optional OFFSET parameter, e.g., OFFSET=-6
rake tmp:cache:clearClears all files and directories in tmp/cache
rake tmp:clearClear session, cache, and socket files from tmp/
rake tmp:createCreates tmp directories for sessions, cache, sockets, and pids
rake tmp:pids:clearClears all files in tmp/pids
rake tmp:sessions:clearClears all files in tmp/sessions
rake tmp:sockets:clearClears all files in tmp/sockets

スポンサーリンク

関連記事

スポンサーリンク

<FRAME> フレームに表示するファイルを指定する

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る