using rvm commands after checking if the command exists