I'm used to enhance rake tasks, but today rake do not want to collaborate...
In particular I want to enhance rake tmp:clear
. And as usual I tried this way:
Rake::Task["tmp:clear"].enhance do
puts "enhanced"
end
I always get a Don't know how to build task 'rake tmp:clear'
on execution.
I tried to:
- Rename my xxx.rake file that contain this piece of code.
- Remove everything but this piece of code.
- Look into rake tasks/tmp.rake source code to see if tmp:clear had some other weird treatment.
- And of course Googled a lot...
I ended up with no solutions/clues.
Thanks for any help. Flavien
Footnotes:
- It works if I change
"tmp:clear"
for"assets:clobber"
for exemple. But still not for"tmp:cache:clear"
or other related to tmp. - I use rails 4.2