Fixing railties dependency >= 3.1.1 < 5