update rails version and fix tests accordingly