Fix app generator test hanging.
Merge pull request #15150 from xtian/fix-railties-tests

Fix app generator test hanging.
Switch to `require_relative` in app template.