<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xoyip</author_name>
  <author_url>https://blog.hatena.ne.jp/xoyip/</author_url>
  <blog_title>ぴよログ</blog_title>
  <blog_url>https://xoyip.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Rake</anon>
  </categories>
  <description>既存のRakeタスクと同名のRakeタスクを定義した場合、上書きではなく連続実行になります。確か。 Railsでフレームワーク側で定義されているRakeタスクが30ほどありますが、それに含まれるタスクを少しカスタムして実行したいような場合に、lib/tasks以下にrakeタスクを追加するだけでは既存のタスクも動いてしまいます。 例えばlib/tasks/db_migrate.rakeとかいうファイルを用意して、次のようなコードを書いたとします。 namespace :db do desc &quot;puts hoge&quot; task :migrate do p &quot;hoge&quot; end end rake -…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxoyip.hatenablog.com%2Fentry%2F2014%2F05%2F13%2F195503&quot; title=&quot;RailsのRakeタスクを上書き・再定義するには - ぴよログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-05-13 19:55:03</published>
  <title>RailsのRakeタスクを上書き・再定義するには</title>
  <type>rich</type>
  <url>https://xoyip.hatenablog.com/entry/2014/05/13/195503</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
