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’

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

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

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

…looks like the most likely form of the many I’ve tried, but it also
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’
invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:ininvoke’
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’
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’

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…



Hah. Got it. I needs :needs

Good ol’ Google…


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