Definitely 19 rolls, as hobbiniho says, you get 27 full lengths of ribbon from each roll. The 0.77 is useless and cannot be used as part of a 90cm length.
If you divide 500 gifts by 27 lengths of 90cm you get 18.5 rolls
Again, part rolls are no good. 18 rolls * 27 lengths =486 gifts therefore 19 rolls are needed to do the full 500 gifts.