While David Stratton offers up a plausible (and perfectly in-cannon and correct) answer that makes a lot of sense, I'd like to offer another possible take on the matter.
In addition to the idea that what the boggart will appear as, is dependent on the individual casting the charm's thoughts, so there really is no way of knowing how it will appear for any particular individual, I would say that perhaps there are certain times when the Ridikulus charm doesn't work or isn't plausible.
Dementors represent fear itself. Lupin says so when discussing the matter with Harry. Lupin tells Harry he is impressed and surprised that Harry's worst fear is a dementor and this follows:
"He smiled slightly at the look of surprise on Harry's face. 'that suggests that what you fear most of all is - fear. Very wise, Harry.'"
Therefore, my thoughts were that there is no way to take the fear out of a dementor form and make them funny (there are a few things in life that cannot be made to be or look ridiculous after all). This would be one form a boggart could have the potential of taking that would cause the riddikulus charm not to work. After all, Mrs. Weasley is almost defeated by one when her boggart repeatedly appears as one of her loved ones dead causing a sense of grief to intermingle with her fear - something she is unable to make look ridiculous (and I dare-say, I'd have a tough one with that little challenge too).
It just shouldn't be as easy as making it look like a blanket (or smoke as wiki indicates in one location) or something - this is fear we are talking about.
Harry has more questions, but they are interrupted by Snape's entrance with "a potion he concocted" for Lupin and Harry's questions are left unanswered.
I'll grant that Lupin's given reason for interrupting Harry, is that he assumed Harry would see Voldemort and Lupin feared the reaction the rest of the class would have. However, I still like the idea that fear is one form of only a few that a boggart could take that would truly challenge even the bravest and/or smartest of wizards.