Fixing a rails command, and adding error-checking to the restart function.