two changes, if a ruby version is specified as /-1[89]mode$/ then change it to /-d1[89]/, and if the ruby is not installed then install it, by only if it is a binary