一个软件task管理和build 自动化的工具。

它允许用户指定tasks和describe dependencies, 也可以在一个namespace中group tasks。

使用Ruby语言写的。

rake -h看帮助

rake -T列出所有rake task.

可以用rake编写脚步任务。

在Rails中编写Rake,将文件后缀为.rake的文件放到/lib/tasks/中

具体可以看ihover的网页。

例子:

namespace :dev do
  task :fake => :environment do
  users = []
  10.times do
  users << User.create!(:email => Faker::Internet.email, :password => "123213")
  end

end

在terminal中执行rake dev:fake

Rails Guide -- Ruby on Rake(未详细阅读)的更多相关文章

  1. (转)x264代码详细阅读之x264.c,common.c,encoder.c

    转自:http://alphamailpost.blog.163.com/blog/static/201118081201281103931932/ x264代码详细阅读第一之x264.chttp:/ ...

  2. 从修复 testerhome(rubychina)网站的一个 bug 学习 ruby&rails on ruby

    前言 testerhome: http://testerhome.com/topics/1480 对于一个差点脱离前沿技术人,想要学习ruby,就意味着要放弃熟悉的操作系统windows,熟悉的ide ...

  3. ActiveStorage Overview --Rails guide (history:7-1更新)

    如何attach一个或多个文件到一个记录.has_many_attach()方法. 如何删除一个附加的文件. purge方法 如何连接到一个附加的文件.url_for() 如何使用variants来转 ...

  4. heroku 部署ruby项目后 未连接数据库显示(We're sorry, but something went wrong. If you are the application owner )

    如何部署请参照: http://blog.csdn.net/xz360717118/article/details/62422741 部署后如果发现显示:We're sorry, but someth ...

  5. java基础学习总结——GUI编程(一) 还未仔细阅读

    一.AWT介绍

  6. ros资料记录,详细阅读

    ROS源码分析--子话题-catkin:https://blog.csdn.net/sukha/article/details/52460492 ROS源码分析:https://blog.csdn.n ...

  7. Ruby入门教程和技巧

    转自:http://blog.csdn.net/cqfz123/article/details/1349050   Ruby真的比Java更好? Ruby On Rails 创始人:对Java 说再见 ...

  8. 小白使用Web Deploy在vs2015中发布到iis遇到的问题及操作流程

    整体流程详细参照:http://www.cnblogs.com/potential/p/3751426.html 问题1.未能连接到远程计算机,请确保在远程计算机上安装了 Web Deploy 并启动 ...

  9. Ruby on Rails中的Rake教程(Rake如何把我灌醉!)

    下面是我们使用Rake任务的例子: 1.给列表中的用户发送邮件 2.每晚数据的计算和报告 3.过期或重新生成缓存 4.备份数据和svn版本(how's this : subversion reposi ...

随机推荐

  1. Spring Security使用心得

    某天,你的客户提出这样一个需求,在点击购买商品的时,如果用户没有注册,并且用户没有账号,这时用户去创建账户,然后要直接返回到想购买商品的付款页面.你会该如何基于Spring Security实现? S ...

  2. 2018CCPC秦皇岛站

    这次去秦皇岛,两个队都打铁回来,真的是蛮耻辱的 可以说是有史以来最差成绩了 其实网络赛就打的不好 两个名额一个是省赛分配的一个是排队排来的 去之前拉了几场之前的CCPC的比赛打 感觉打的都还不错的 热 ...

  3. D. Little Artem and Dance---cf669D(模拟)

    题目链接:http://codeforces.com/problemset/problem/669/D 给你n个数,一开始是1 2 3 4 5 6 ... n 这样的 现在有两个操作,第一个操作是所有 ...

  4. 通过html<map>标签给图片加链接

    前面我们有谈到了通过图片定位给一张图片添加多个链接,现在用另外一种方法来实现,用html<map>标签给图片加链接 <img src="/images/hlj.jpg&qu ...

  5. js-jquery-从SweetAlert到SweetAlert2

    原文地址:https://github.com/limonte/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2 1. IE supp ...

  6. python初识(三)

    目录: 字符编码 文件操作 循环结构拾遗 函数 整体介绍 函数的参数 函数的返回值 函数的调用 自定义函数 一.字符编码 1.了解字符编码的知识储备 a. 文件编辑存取文件的原理(nodepad++, ...

  7. HDU1452:Happy 2004(求因子和+分解质因子+逆元)上一题的简单版

    题目链接:传送门 题目要求:求S(2004^x)%29. 题目解析:因子和函数为乘性函数,所以首先质因子分解s(2004^x)=s(2^2*x)*s(3^x)*s(167^x); 因为2与29,166 ...

  8. rewrite or internal redirection cycle while processing "/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/jenkins/

    折腾了很久,跟nginx配置没有关系.最终是把php版本从7.1降到5.6才解决的,是跟tp3.2匹配的

  9. centos 相关

    运行locate httpd.conf,提示-bash: locate: command not found错误.则需要安装mlocate软件包: yum install mlocate 搜索,提示l ...

  10. 26. Remove Duplicates from Sorted Array(删除排序数组中的重复元素,利用排序的特性,比较大小)

      Given a sorted array, remove the duplicates in-place such that each element appear only once and r ...