1. Using

draw the shape you want your ribbon to follow.
2. Using the

draw a small rectangle. Set stroke to none and fill to desired color.
3. Duplicate the rectangle and change the color. Repeat as desired until the number of colors is satisfactory.
4. Select all rectangles and convert to path (Path>Object to Path).
5. Using the align and distribute dialogue, align the tops and bottoms of your rectangles until you have them in the desired order.
6. Select all the rectangles and group them.
7. Select the group of rectangles and the ribbon path. Do Extensions>Generate from Path>Pattern along path. Select the options for repeated, stretched and ribbon. Set all the numerical options to zero.
That's it. Note that the skinnier you make your rectangles the smoother your ribbon will appear. The top example is made with a much thinner strip of colored rectangles.