rails 4.1.7 compatibility

Please guide me, if you want it in a different way.