I've spent some frustrating hours on this, and it seems to be a bug in a particular framework that Apple ships with Mac OS, but which now doesn't work on Lion. Unfortunately, despite shipping this framework (RubyCocoa), Apple don't offer support for it, and I can't find any simple work-around.
I'm working on the non-simple work-around, but I'm also very busy with other commitments and a holiday with my family. Please watch this space for news.