Sorts gem versions out