Fixing the railties dependency to >= 3.1.1 < 4.1