Fix rails version upgrade issue