detect project and rails root