update ruby to 2.1.3
update rails to 4.1.6 and all dependencies
change app config according to RailsDiff

http://railsdiff.org/