do not use ruby from current dir if there is nothing to use, fix #2893