desc 'For test params' task :test => :environment do puts "get params, I am #{ENV['who']}" end 使用方法 rake test who="yang"