Rake 0.8.1 command line parameter problem?

This could be just me and my ignorance, but I can’t seem to figure it
out. I’ve been playing with the new command-line parameters feature in
Rake 0.8.1 (for which I give much thanks, btw - setting those
environment variables was getting tedious).

SImplifying, I have these:

task :q do
puts ‘q’
end

task :stuck_out_tongue: => :q do
puts ‘p’
end

task :r, :x do |t, args|
puts args.x
end

which I invoke with the following, all of which behave as I expect:
rake q
rake p
rake r[a]

But for the life of me, I can’t figure out how to specify a task that
takes arguments and has a dependency - this:

task :s , :x => :q do |t, args|
puts args.x
end

…looks like the most likely form of the many I’ve tried, but it also
fails:
rake aborted!
Don’t know how to build task ‘’

Switching on trace gets me this

c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1634:in []' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:516:ininvoke_prerequisites’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:insend’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:ininvoke_prerequisites’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:ininvoke’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:intop_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:intop_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:intop_level’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:instandard_exception_handling’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in run' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 c:/ruby/bin/rake:16:inload’
c:/ruby/bin/rake:16

If I’m being dumb, please educate me! If there’s a better place to
post this, and I couldn’t find one, please let me know. And if it
should be a bug (I’ll keep working on understanding what’s happening
in the meantime), then at least I’ll know someone’s now aware of it…

Thanks.

Mike

Hah. Got it. I needs :needs

Good ol’ Google…

http://rubyforge.org/pipermail/rake-devel/2007-December/000352.html

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs