class Rake::Application

def rakefile_location

def rakefile_location
  begin
    fail
  rescue RuntimeError => ex
    ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
  end
end