Below are my results from testing that rakefile in a Command window on
WinXP-Pro/SP3 running Rails 2.3.5, where Rake complained "Don't know
how to build task 'default'". How do I get it to run as I intend?
Thanks in Advance,
Richard
=== Command Window ===
K:\Temp>dir
Volume in drive K is K02-100G_NT
Volume Serial Number is B00C-F65F
Below are my results from testing that rakefile in a Command window on
WinXP-Pro/SP3 running Rails 2.3.5, where Rake complained "Don't know
how to build task 'default'". How do I get it to run as I intend?
K:\Temp>type rakefile
s/b Rakefile, though possibly case doesn't matter on Windows --
you can confirm or disprove that, but in any case,
K:\Temp>rake
that's not how it's invoked in the tutorial you cite. Look again.
(in K:/Temp)
rake aborted!
Don't know how to build task 'default'
and found that it didn't work "in any directory" as advertised.
I did three things:
1 Upgraded the example so that it would work "in any directory" (I
suspect it would work in the root dir.)
2. Added command[echoing code
3. Remove spurious quotes from the argument of the echo command.
Comments in the Rakefile below spell out all the details if you're
interested.
Thanks for nudging me forward.
Good question. I copied the Tempfile to C:\
Ran my version, which added the working dir. to tmp.txt
Ran fine.
Ran original version -- same problem. So my speculation was wrong.
Maybe that's because Windows has no real root. There's just the \
address in a partition. I've got about a half-dozen partitions, plus
similar symbols for some devices
It looks to me like the author does run on U*ix, because his next
example is:
[jason@brick:~/src]$ rake ready_for_the_day.
There also a typo for this example: He claims the output from this
command includes the line:
Made 5 cups of coffee. Shakes are gone.
In fact, it's only 2 cups. His next example:
[jason@brick:~/src]$ rake COFFEE_CUPS=5 make_coffee
produces the 5 cup.
I'm just amused be the problem the author faced in trying to produce a
perfect tutorial. I know that feeling all too well. And I am truly
grateful for the author publication of his tutorial. It's leading me
through the nuances of Rake.
And thanks to you for helping me in my quest for a "black belt" in
Rake-ism