Since this looks like it depends on the existence of Foreman, why not invert the relationship like we do for other rake tasks and have it called from the foreman app root?