What is the new format for rake tasks? (task :t, arg, :needs => [deps] versus task :t, [args] => [deps])

前端 未结 2 1411
名媛妹妹
名媛妹妹 2021-02-12 14:31

I\'m using Rails 3.1 beta with Ruby 1.9.2 and rake 0.9.2, and have a bunch of rake tasks I\'ve written. Here is an example:

namespace :data do
  desc \"dump the          


        
2条回答
  •  清酒与你
    2021-02-12 14:58

    I know it is sometimes hard to decipher but the error message gives you the new format:

    task :t, [args] => [deps]
    

    So for your example:

    task :dump_graph, :species_id => :environment
    

    http://www.postal-code.com/binarycode/2011/06/02/rake-needs-deprecated/

提交回复
热议问题