updated ruby and rails and added redirect for non-matching users