Splendor is a great game, but the rules were written sub-optimally.
The following quotes the rules that specify what actions a player can take on his turn:
On their turn, a player must choose to perform only one of the following four actions.
- Take 3 gem tokens of different colors.
- Take 2 gem tokens of the same color. This action is only possible if there are at least 4 tokens of the chosen color left when the player takes them.
- Reserve 1 development card and take 1 gold token (joker).
- Purchase 1 face-up development card from the middle of the table or a previously reserved one.
As written, it's not hard to get into a situation where it's impossible to perform a legal turn. I presume you can pass if you can't perform any of the actions, but there might be other options.
Can you reserve a development card if there is no gold left (taking the development card without gaining gold)?
Can you take gems if there are fewer than three colors of gems left (taking one from each of the remaining colors)?