- 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
分享到:
相关推荐
在这个例子中,`:default`是任务名,`do...end`之间的代码块是任务体,当执行`rake`命令时,如果没有指定任务,就会默认执行`:default`任务。 ### 3. 任务依赖 Rake支持任务间的依赖关系,例如: ```ruby task :...
通过运行`gem install rake-0.8.7.gem`命令,开发者可以将这个特定版本的rake添加到他们的开发环境中。而`rake1-0.8.7.tgz`则是一个压缩包,可能包含了源代码和其他相关文件,用于那些希望从源码编译安装的用户。 ...
安装这个版本的rake,开发者通常需要解压文件,然后使用gem(Ruby的包管理器)进行安装,命令可能类似于`gem install rake-0.8.7.gem`。确保安装正确后,就可以在Rails环境中使用rake来执行各种项目任务。 值得注意...
安装`RAKE`库的命令为: ```bash pip install git+https://github.com/aneesha/RAKE.git ``` 使用时,首先需要导入`RAKE`模块,然后创建`RAKE`对象,加载停用词列表,接着对文本进行处理并提取关键词: ```python ...
来自practical rails social networking sites上的第二章的实例,应用了数据导入,导入数据到mysql后就可以使用,命令: rake db:migrate(进入文件夹"railscoder")
Rake的核心概念之一是基于依赖的编程,这是一种不同于传统命令式编程的计算模型。在传统的构建系统中,开发者通常需要显式地指定每个构建步骤的执行顺序。而在Rake中,构建过程被定义为一系列任务以及这些任务之间的...
使用该库时,首先需要安装,可以通过 Python 的 `pip` 命令完成: ```bash pip install rake-nltk ``` 接着,在 Python 代码中导入并使用 `Rake` 类: ```python from rake_nltk import Rake # 初始化 Rake 对象...
在项目根目录下创建此文件,Rake可以通过执行`rake`命令来运行其中的任务。 3. **参数传递**:Rake允许通过命令行参数来传递值,这对于定制化工具尤其有用。可以使用`ARGV`数组来访问这些参数。 4. **Ruby编程**:...
### Java基础之Rails命令大全知识点解析 #### 一、Rails 命令概述 Rails 是一个用于 Web 开发的框架,它基于 Ruby 语言。Rails 遵循 MVC(Model-View-Controller)架构模式,使得 Web 应用程序的开发更加高效、简洁...
使用简单的 rake 命令整理您的桌面、下载和其他杂乱文件夹。 简单有效。 用法 在开始使用 Mess Organizer 之前,您需要在您的操作系统上安装和 。 如果你已经安装了 Rake gem,只需将这个 repo 克隆到你想要组织的...
### Ruby 命令集合(一些有用的命令) 在Ruby编程语言的世界里,Rails是一个非常流行的Web应用框架。本文将详细介绍一些常用的Rails命令及其用途,帮助开发者更好地理解和掌握Rails的使用方法。 #### 1. 创建一个...
MATLAB 语言基础和 CDMA-RAKE 接收机仿真 本文档主要讲述了 MATLAB 语言基础和基于 MATLAB 的 CDMA-RAKE 接收机仿真。下面是相关知识点的详细解释: 1. MATLAB 语言基础 MATLAB 是一种高级的技术计算语言和 ...
7. **启动后台任务**: 使用 `rake` 命令加上任务名称即可启动任务,例如 `rake background_task`。如果使用 DJ 或 Resque,还需要启动对应的 worker。 8. **错误处理与日志记录**: 在后台任务中,确保捕获并记录...
《WCDMA上行链路理解与RAKE接收技术详解》 WCDMA(Wideband Code Division Multiple Access),即宽带码分多址,是第三代移动通信(3G)的重要标准之一,广泛应用于全球的移动通信网络。本资料包“WWCDMA_uplinkC....
它允许您使用 bundler 提供的相同友好的 rake 命令来发布 gems。 rake release保留了相同的构建/标记/推送功能,除了它现在被推送到您的私有 gem 存储库。 耶! 用法! 在您的宝石规格中 gem . add_development_...
在终端中,你可以通过`rake`命令来执行`Rakefile`中的任务。如果没有指定任务,`rake`将自动执行标记为`default`的任务。例如: ```bash $ rake ``` ### 6. `rake`与其他工具的集成 `rake`可以轻松地与测试框架如...
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 仅显示一条消息,要求用户自己运行迁移。 简单的 ...
1. **安装**: 在Ruby环境中,可以通过`gem install rake`命令来安装Rake。 2. **编写Rakefile**: 在项目根目录下创建`Rakefile`,并在其中定义任务和依赖。 3. **运行任务**: 使用`rake [task_name]`命令来执行...