A beautiful and elegant problem from combinatorics. This problem has a stunningly simple solution, requires no more than a twelve-year-old to understand.
Let $(S, R)$ represent the number of sapphires and rubies in the box. Let's consider the box after $2$ gems are taken out.
If both gems are sapphires: $(S, R) \rightarrow (S - 1, R)$
If both gems are rubies: $(S, R) \rightarrow (S + 1, R - 2)$
If they are different: $(S, R) \rightarrow (S - 1, R)$
Notice that the parity of $R$ never changes since it either remains the same or decrements by $2.$ So if we start with $42$ rubies, the number of rubies never becomes odd. We also know that the number of gems decreases by $1$ each time until only one gem is left.