If it's going to be that complicated it might be easier to just use rbenv on linux.