Fix ruby version detection