Created
May 16, 2011 19:55
-
-
Save meltzerj/975201 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rake aborted! | |
Don't know how to build task ':best_referral' | |
(See full trace by running task with --trace) | |
(in /app) | |
new-computers-computer:signup newcomputer$ heroku rake :best_referral --trace | |
rake aborted! | |
Don't know how to build task ':best_referral' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' | |
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/bin/rake:31 | |
/usr/ruby1.8.7/bin/rake:19:in `load' | |
/usr/ruby1.8.7/bin/rake:19 | |
(in /app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :best_referral => :environment do | |
SignedUser.all.each do |user| | |
if current_max_user == nil | |
current_max_user = user | |
elsif user.invitation.recipients.count > current_max_user.invitation.recipients.count | |
current_max_user = user | |
end | |
end | |
puts "Winner:#{current_max_user.name} Id:#{current_max_user.id}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment