fixes issues and error, must restar server each time changing ruby code