- rake db:abort_if_pending_migrations # Raises an error if there are pending migrations
- rake db:charset # Retrieves the charset for the current environment's database
- rake db:collation # Retrieves the collation for the current environment's database
- rake db:create # Create the database defined in config/database.yml for the current RAILS_ENV
-
rake db:create:all # Create all the local databases defined in config/database.yml
- rake db:drop # Drops the database for the current RAILS_ENV
-
rake db:drop:all # Drops all the local databases defined in config/database.yml
- rake 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 with VERSION=x. Turn ...
- 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 environment
- rake 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.
-
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 AR
-
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 migration for use with ActiveRecord::SessionStore
-
rake db:structure:dump # Dump the database structure to a SQL file
-
rake db:test:clone # Recreate the test database from the current environment's database schema
-
rake db:test:clone_structure # Recreate the test databases from the development structure
-
rake db:test:load # Recreate the test database from the current schema.rb
- rake db:test:prepare # Check for pending migrations and load the test schema
-
rake db:test:purge # Empty the test database
-
rake db:version # Retrieves the current schema version number
-
rake doc:app # Build the RDOC 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:guides # Generate Rails guides
- rake doc:plugins # Generate documentation for all installed plugins
-
rake doc:rails # Build the RDOC HTML Files
-
rake doc:reapp # Force a rebuild of the RDOC files
-
rake doc:rerails # Force a rebuild of the RDOC files
- rake gems # List the gems that this rails application depends on
- rake gems:build # Build any native extensions for unpacked gems
-
rake gems:build:force # Force the build of all gems
-
rake 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 bytes
-
rake middleware # Prints out your Rack middleware stack
-
rake notes # Enumerate all annotations
-
rake notes:custom # Enumerate a custom annotation, specify with ANNOTATION=WTFHAX
-
rake notes:fixme # Enumerate all FIXME annotations
-
rake notes:optimize # Enumerate all OPTIMIZE annotations
-
rake notes:todo # Enumerate all TODO annotations
- rake rails:freeze:edge # Lock to latest Edge Rails, for a specific release use RELEASE= 1.2 . 0
- rake 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/template
- rake rails:unfreeze # Unlock this application from freeze of gems or edge and return to a fluid use of system gems
- rake rails:update # Update both configs, scripts and public /javascripts from Rails
-
rake rails:update:application_controller # Rename application.rb to application_controller.rb
-
rake rails:update:configs # Update config/boot.rb from your current rails install
- rake rails:update:generate_dispatchers # Generate dispatcher files in RAILS_ROOT/public
-
rake rails:update:javascripts # Update your javascripts from your current rails install
- rake rails:update:scripts # Add new scripts to the application script/ directory
-
rake 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 application
-
rake test # Run all unit, functional and integration tests
- rake test:benchmark # Run tests for benchmarkdb:test:prepare / Benchmark the performance tests
- rake test:functionals # Run tests for functionalsdb:test:prepare / Run the functional tests in test/functional
- rake test:integration # Run tests for integrationdb:test:prepare / Run the integration tests in test/integration
- rake 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 tests
- rake test:recent # Run tests for recentdb:test:prepare / Test recent changes
- rake 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/unit
- rake 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 time
- rake 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/cache
-
rake tmp:clear # Clear session, cache, and socket files from tmp/
- rake tmp:create # Creates tmp directories for sessions, cache, sockets, and pids
-
rake tmp:pids:clear # Clears all files in tmp/pids
-
rake tmp:sessions:clear # Clears all files in tmp/sessions
- rake tmp:sockets:clear # Clears all files in tmp/sockets
#单独测试某一个case的方法:
cd app_dir
ruby test/unit/filename -n testcasename
ruby test/functional/filename -n testcasename
分享到:
相关推荐
来自practical rails social networking sites上的第二章的实例,应用了数据导入,导入数据到mysql后就可以使用,命令: rake db:migrate(进入文件夹"railscoder")
使用简单的 rake 命令整理您的桌面、下载和其他杂乱文件夹。 简单有效。 用法 在开始使用 Mess Organizer 之前,您需要在您的操作系统上安装和 。 如果你已经安装了 Rake gem,只需将这个 repo 克隆到你想要组织的...
它允许您使用 bundler 提供的相同友好的 rake 命令来发布 gems。 rake release保留了相同的构建/标记/推送功能,除了它现在被推送到您的私有 gem 存储库。 耶! 用法! 在您的宝石规格中 gem . add_development_...
Rails Reseed 在开发中的 rails 应用程序上工作时,您可能希望重新开始...没什么可做的,安装 gem 然后运行 Rake -T 找到闪亮的新 rake 命令。 要运行,只需输入rake db:reseed 测验 要测试 gem,请运行bundle exe
添加 Rake 命令以转储和恢复应用程序的数据库。 委托常规转储实用程序,例如mysqldump和pg_dump 。 与它们不同的是,您不必记住任何正确的语法。 您也不必指定连接参数; 如果应用程序工作,转储程序也工作。 ...
Heroku Buildpack:SmartMigrate更新出于某种原因,我无法让 heroku 编译器 dyno 识别 bundle 或 rake 命令。 作为一种解决方法,如果检测到更改,此 buildpack 仅显示一条消息,要求用户自己运行迁移。 简单的 ...
rake:Ruby的make-make构建工具
为了在命令行上使用 Rake 任务,因此您需要在调用命令的地方传递 env vars,就像内置配方对网络服务器所做的那样。 这既费力又容易出错,因此这些方法通过创建 rake 任务来解决这个问题,这些任务已经嵌入了部署...
Special Delivery 允许您使用 Bundler 的 rake 命令将 gem 发布到您的 geminabox 服务器。 它的灵感来自 Josh Krueger 的 gem。 安装 打开您的 gemspec 并添加special_delivery作为开发依赖项: Gem :: ...
Thermite是一个基于Rake的帮助程序,用于构建和分发基于Rust的Ruby扩展。 特征 提供用于包装cargo指令的包装器。 通过CARGO环境变量处理非标准cargo安装。 选择加入以允许用户安装在GitHub版本上托管的预编译Rust...
如果不运行rake命令,则所有内容都将隔离在.dotfiles目录中,并且不会干扰您的现有环境。 rake install:all Rake会在覆盖任何已存在的文件之前询问您。 您还可以使用以下方法之一安装环境的子集。 rake install:...
会员 陈玉玺倪燕英张耀仁朱千云 关键跟踪器链接开发备忘录常见的 rake 命令rake db:migrate VERSION=20080906120000 运行所需的迁移,直到达到指定的版本rake db:rollback 回滚上次迁移rake db:setup 创建数据库,...
运行以下rake命令,将所有需要的文件复制到公用文件夹中: rake radiant:extensions:ck_editor_filter:update 就是这样! 现在,页面编辑屏幕上的过滤器下拉列表中应该具有“ CKEditor”。 选择此选项将生成...
观看天空仪表板 有关糟糕的旧代码,请参见: : ... 可通过rake -T获得其他rake命令 重要说明:游戏数据都在游戏模型下链接在一起。 此外,用户当前只能属于一个游戏。 要运行测试: bundle exec rspec
garage_client, 用于车库应用程序API的ruby 客户端库 GarageClient GarageClient是一个简单的ruby 库,可以为车库应用程序API提供原始客户机接口。安装从rake命令安装:$ bundle install$ rake install
然后运行以下命令之一... 显示迁移以基于关联添加/删除所有必要的索引: lol_dba db:find_indexes 要在db / migrate_sql文件夹中为迁移生成.sql文件,请执行以下操作: lol_dba db:migrate_sql # defaults to all...
setup # this will generate a todos_development and todos_test dbrake db:migrate # runs the migrations in db/migrationsrake db:migrate RAKE_ENV=test # migrate test db 您可以使用默认的rake命令运行规范。...
在终端中运行命令 $ sudo npm i -g gulp bower browser-sync $ sudo gem install bundler $ bundle install $ npm install 使用Rake任务 $ rake post title="TITLE OF THE POST" $ rake page name="about.md" $ rake...
如果没有安装这样的钩子,将安装一个调用` rake precommit `安装 作为一个Rails插件 这个插件可以通过 config.gem 或 gem bundler 作为 gem 安装。 要求库为“git_precommit”。 要安装为非 gem 插件,请从 Rails ...
用法生成游乐场.playground文件可以使用以下rake命令之一生成:#生成iPad和Xcode rake build#仅生成Xcode rake xcode:build#仅生成iPad rake ipad:build Xcode在Xcode中打开生成的Xcode.playground。...