Made changes to fix errors introduced by updating rails and ruby