Fixes issue where rake tasks used for testing are loaded by Application.load_tasks, even in production. But those rake tasks for testing are including gems that are not included in production environment.