`
yanzilee9292
  • 浏览: 534712 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Rake命令大全

 
阅读更多

  1. rake db:abort_if_pending_migrations       # Raises an error if  there are pending migrations  
  2. rake db:charset                           # Retrieves the charset for  the current environment's database  
  3. rake db:collation                         # Retrieves the collation for  the current environment's database  
  4. rake db:create                            # Create the database defined in config/database.yml for the current RAILS_ENV  
  5. rake db:create:all                        # Create all the local databases defined in config/database.yml  
  6. rake db:drop                              # Drops the database for  the current RAILS_ENV  
  7. rake db:drop:all                          # Drops all the local databases defined in config/database.yml  
  8. rake db:fixtures:identify                 # Search for  a fixture given a LABEL or ID.  
  9. rake db:fixtures:load                     # Load fixtures into the current environment's database.  
  10. 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 ...  
  11. rake db:migrate:down                      # Runs the "down"   for  a given migration VERSION.  
  12. rake db:migrate:redo                      # Rollbacks the database one migration and re migrate up.  
  13. rake db:migrate:reset                     # Resets your database using your migrations for the current environment  
  14. rake db:migrate:up                        # Runs the "up"   for  a given migration VERSION.  
  15. rake db:reset                             # Drops and recreates the database from db/schema.rb for the current environment.  
  16. rake db:rollback                          # Rolls the schema back to the previous version.  
  17. rake db:schema:dump                       # Create a db/schema.rb file that can be portably used against any DB supported by AR  
  18. rake db:schema:load                       # Load a schema.rb file into the database  
  19. rake db:sessions:clear                    # Clear the sessions table  
  20. rake db:sessions:create                   # Creates a sessions migration for use with ActiveRecord::SessionStore  
  21. rake db:structure:dump                    # Dump the database structure to a SQL file  
  22. rake db:test:clone                        # Recreate the test database from the current environment's database schema  
  23. rake db:test:clone_structure              # Recreate the test databases from the development structure  
  24. rake db:test:load                         # Recreate the test database from the current schema.rb  
  25. rake db:test:prepare                      # Check for  pending migrations and load the test schema  
  26. rake db:test:purge                        # Empty the test database  
  27. rake db:version                           # Retrieves the current schema version number  
  28. rake doc:app                              # Build the RDOC HTML Files  
  29. rake doc:clobber_app                      # Remove rdoc products  
  30. rake doc:clobber_plugins                  # Remove plugin documentation  
  31. rake doc:clobber_rails                    # Remove rdoc products  
  32. rake doc:guides                           # Generate Rails guides  
  33. rake doc:plugins                          # Generate documentation for  all installed plugins  
  34. rake doc:rails                            # Build the RDOC HTML Files  
  35. rake doc:reapp                            # Force a rebuild of the RDOC files  
  36. rake doc:rerails                          # Force a rebuild of the RDOC files  
  37. rake gems                                 # List the gems that this  rails application depends on  
  38. rake gems:build                           # Build any native  extensions  for  unpacked gems  
  39. rake gems:build:force                     # Force the build of all gems  
  40. rake gems:install                         # Installs all required gems.  
  41. rake gems:refresh_specs                   # Regenerate gem specifications in correct format.  
  42. rake gems:unpack                          # Unpacks all required gems into vendor/gems.  
  43. rake gems:unpack:dependencies             # Unpacks all required gems and their dependencies into vendor/gems.  
  44. rake log:clear                            # Truncates all *.log files in log/ to zero bytes  
  45. rake middleware                           # Prints out your Rack middleware stack  
  46. rake notes                                # Enumerate all annotations  
  47. rake notes:custom                         # Enumerate a custom annotation, specify with ANNOTATION=WTFHAX  
  48. rake notes:fixme                          # Enumerate all FIXME annotations  
  49. rake notes:optimize                       # Enumerate all OPTIMIZE annotations  
  50. rake notes:todo                           # Enumerate all TODO annotations  
  51. rake rails:freeze:edge                    # Lock to latest Edge Rails, for  a specific release use RELEASE= 1.2 . 0   
  52. rake rails:freeze:gems                    # Lock this application to the current gems (by unpacking them into vendor/rails)  
  53. rake rails:template                       # Applies the template supplied by LOCATION=/path/to/template  
  54. rake rails:unfreeze                       # Unlock this  application from freeze of gems or edge and  return to a fluid use of system gems  
  55. rake rails:update                         # Update both configs, scripts and public /javascripts from Rails  
  56. rake rails:update:application_controller  # Rename application.rb to application_controller.rb  
  57. rake rails:update:configs                 # Update config/boot.rb from your current rails install  
  58. rake rails:update:generate_dispatchers    # Generate dispatcher files in RAILS_ROOT/public   
  59. rake rails:update:javascripts             # Update your javascripts from your current rails install  
  60. rake rails:update:scripts                 # Add new  scripts to the application script/ directory  
  61. rake routes                               # Print out all defined routes in match order, with names.  
  62. rake secret                               # Generate a crytographically secure secret key.  
  63. rake stats                                # Report code statistics (KLOCs, etc) from the application  
  64. rake test                                 # Run all unit, functional and integration tests  
  65. rake test:benchmark                       # Run tests for benchmarkdb:test:prepare / Benchmark the performance tests  
  66. rake test:functionals                     # Run tests for functionalsdb:test:prepare / Run the functional tests in test/functional  
  67. rake test:integration                     # Run tests for integrationdb:test:prepare / Run the integration tests in test/integration  
  68. rake test:plugins                         # Run tests for  pluginsenvironment / Run the plugin tests in vendor/plugins/*/**/ test (or specify with PLUGIN=name)  
  69. rake test:profile                         # Run tests for  profiledb:test:prepare / Profile the performance tests  
  70. rake test:recent                          # Run tests for  recentdb:test:prepare / Test recent changes  
  71. rake test:uncommitted                     # Run tests for uncommitteddb:test:prepare / Test changes since last checkin (only Subversion and Git)  
  72. rake test:units                           # Run tests for  unitsdb:test:prepare / Run the unit tests in test/unit  
  73. rake time:zones:all                       # Displays names of all time zones recognized by the Rails TimeZone class, grouped by offset.  
  74. rake time:zones:local                     # Displays names of time zones recognized by the Rails TimeZone class with the same offset as the system local time  
  75. rake time:zones:us                        # Displays names of US time zones recognized by the Rails TimeZone class, grouped by offset.  
  76. rake tmp:cache:clear                      # Clears all files and directories in tmp/cache  
  77. rake tmp:clear                            # Clear session, cache, and socket files from tmp/  
  78. rake tmp:create                           # Creates tmp directories for  sessions, cache, sockets, and pids  
  79. rake tmp:pids:clear                       # Clears all files in tmp/pids  
  80. rake tmp:sessions:clear                   # Clears all files in tmp/sessions  
  81. rake tmp:sockets:clear                    # Clears all files in tmp/sockets  

   #单独测试某一个case的方法:

   ruby test/unit/filename -n testcasename

   ruby test/functional /filename -n testcasename

分享到:
评论

相关推荐

    rake详解(清晰)

    在这个例子中,`:default`是任务名,`do...end`之间的代码块是任务体,当执行`rake`命令时,如果没有指定任务,就会默认执行`:default`任务。 ### 3. 任务依赖 Rake支持任务间的依赖关系,例如: ```ruby task :...

    rake-0.8.7

    通过运行`gem install rake-0.8.7.gem`命令,开发者可以将这个特定版本的rake添加到他们的开发环境中。而`rake1-0.8.7.tgz`则是一个压缩包,可能包含了源代码和其他相关文件,用于那些希望从源码编译安装的用户。 ...

    rake-0.8.7.tgz

    安装这个版本的rake,开发者通常需要解压文件,然后使用gem(Ruby的包管理器)进行安装,命令可能类似于`gem install rake-0.8.7.gem`。确保安装正确后,就可以在Rails环境中使用rake来执行各种项目任务。 值得注意...

    RAKE关键词提取python代码

    安装`RAKE`库的命令为: ```bash pip install git+https://github.com/aneesha/RAKE.git ``` 使用时,首先需要导入`RAKE`模块,然后创建`RAKE`对象,加载停用词列表,接着对文本进行处理并提取关键词: ```python ...

    自定义rake工具自定义rake工具

    在项目根目录下创建此文件,Rake可以通过执行`rake`命令来运行其中的任务。 3. **参数传递**:Rake允许通过命令行参数来传递值,这对于定制化工具尤其有用。可以使用`ARGV`数组来访问这些参数。 4. **Ruby编程**:...

    rails简单实例_rake数据导入

    来自practical rails social networking sites上的第二章的实例,应用了数据导入,导入数据到mysql后就可以使用,命令: rake db:migrate(进入文件夹"railscoder")

    Using the Rake Build Language

    Rake的核心概念之一是基于依赖的编程,这是一种不同于传统命令式编程的计算模型。在传统的构建系统中,开发者通常需要显式地指定每个构建步骤的执行顺序。而在Rake中,构建过程被定义为一系列任务以及这些任务之间的...

    Python-rakenltkPython实现使用NLTK的快速自动关键字提取算法

    使用该库时,首先需要安装,可以通过 Python 的 `pip` 命令完成: ```bash pip install rake-nltk ``` 接着,在 Python 代码中导入并使用 `Rake` 类: ```python from rake_nltk import Rake # 初始化 Rake 对象...

    java基础之rails命令大全.pdf

    ### Java基础之Rails命令大全知识点解析 #### 一、Rails 命令概述 Rails 是一个用于 Web 开发的框架,它基于 Ruby 语言。Rails 遵循 MVC(Model-View-Controller)架构模式,使得 Web 应用程序的开发更加高效、简洁...

    mess_organizer:使用简单的 rake 命令组织您的文档

    使用简单的 rake 命令整理您的桌面、下载和其他杂乱文件夹。 简单有效。 用法 在开始使用 Mess Organizer 之前,您需要在您的操作系统上安装和 。 如果你已经安装了 Rake gem,只需将这个 repo 克隆到你想要组织的...

    ruby命令集合(一些有用的命令)

    ### Ruby 命令集合(一些有用的命令) 在Ruby编程语言的世界里,Rails是一个非常流行的Web应用框架。本文将详细介绍一些常用的Rails命令及其用途,帮助开发者更好地理解和掌握Rails的使用方法。 #### 1. 创建一个...

    毕业设计(论文)-基于MATLAB的CDMA-RAKE接收机仿真.doc

    MATLAB 语言基础和 CDMA-RAKE 接收机仿真 本文档主要讲述了 MATLAB 语言基础和基于 MATLAB 的 CDMA-RAKE 接收机仿真。下面是相关知识点的详细解释: 1. MATLAB 语言基础 MATLAB 是一种高级的技术计算语言和 ...

    Rails3 使用rake启动后台任务

    7. **启动后台任务**: 使用 `rake` 命令加上任务名称即可启动任务,例如 `rake background_task`。如果使用 DJ 或 Resque,还需要启动对应的 worker。 8. **错误处理与日志记录**: 在后台任务中,确保捕获并记录...

    WWCDMA_uplinkC.rar_TPC decode_WCDMA检测_rake

    《WCDMA上行链路理解与RAKE接收技术详解》 WCDMA(Wideband Code Division Multiple Access),即宽带码分多址,是第三代移动通信(3G)的重要标准之一,广泛应用于全球的移动通信网络。本资料包“WWCDMA_uplinkC....

    bundler_geminabox:允许您使用 bundler 的 rake 任务发布到 geminabox 服务器

    它允许您使用 bundler 提供的相同友好的 rake 命令来发布 gems。 rake release保留了相同的构建/标记/推送功能,除了它现在被推送到您的私有 gem 存储库。 耶! 用法! 在您的宝石规格中 gem . add_development_...

    rake:Ruby的make-make构建工具

    在终端中,你可以通过`rake`命令来执行`Rakefile`中的任务。如果没有指定任务,`rake`将自动执行标记为`default`的任务。例如: ```bash $ rake ``` ### 6. `rake`与其他工具的集成 `rake`可以轻松地与测试框架如...

    reseed:实现 reseed rake 任务的简单 rails gem

    Rails Reseed 在开发中的 rails 应用程序上工作时,您可能希望重新开始...没什么可做的,安装 gem 然后运行 ​​Rake -T 找到闪亮的新 rake 命令。 要运行,只需输入rake db:reseed 测验 要测试 gem,请运行bundle exe

    rails_db_dump:用于万无一失的数据库转储的 Rake 任务

    添加 Rake 命令以转储和恢复应用程序的数据库。 委托常规转储实用程序,例如mysqldump和pg_dump 。 与它们不同的是,您不必记住任何正确的语法。 您也不必指定连接参数; 如果应用程序工作,转储程序也工作。 ...

    heroku-buildpack-smartmigrate:警告开发人员运行 rake db 的简单 Heroku buildpack

    Heroku Buildpack:SmartMigrate更新出于某种原因,我无法让 heroku 编译器 dyno 识别 bundle 或 rake 命令。 作为一种解决方法,如果检测到更改,此 buildpack 仅显示一条消息,要求用户自己运行迁移。 简单的 ...

    Ruby-RakeRuby类似make的构建工具

    1. **安装**: 在Ruby环境中,可以通过`gem install rake`命令来安装Rake。 2. **编写Rakefile**: 在项目根目录下创建`Rakefile`,并在其中定义任务和依赖。 3. **运行任务**: 使用`rake [task_name]`命令来执行...

Global site tag (gtag.js) - Google Analytics