Fix inclusion of rails stuff only for rails