<p>I'm building a group calendar application that needs to support recurring events, but all the solutions I've come up with to handle these events seem like a hack. I can limit how far ahead one can look, and then generate all the events at once. Or I can store the events as repeating and dynamically display them when one looks ahead on the calendar, but I'll have to convert them to a normal event if someone wants to change the details on a particular instance of the event.</p>

<p>I'm sure there's a better way to do this, but I haven't found it yet. What's the best way to model recurring events, where you can change details of or delete particular event instances?</p>

<p>(I'm using Ruby, but please don't let that constrain your answer. If there's a Ruby-specific library or something, though, that's good to know.)</p>

You may want to look at iCalendar software implementations or the standard itself (
RFC 2445
RFC 5545
).
Ones to come to mind quickly are the Mozilla projects
http://www.mozilla.org/projects/calendar/
A quick search reveals
http://icalendar.rubyforge.org/
as well.
Other options can be considered depending on how you're going to store the events.  Are you building your own database schema?  Using something iCalendar-based, etc.?