Fix Rails version detection, set default ruby