fix selecting rubies for upgrade, fix #1527