rails/rails — pull request #10708 by os97673 (2013-05-21 09:49:16+00:00)
Title: Rake.application may be undefined when Rake is defined.

The code expects that as soon as Rake module is defined, Rake.application is defined too. But this may not be true.
E.g. RubyMine's loggers are defined under Rake::TeamCity module and so Rake module is defined, but Rake.application isn't