cocos2d is writen in Objective-C so in principle it should be compatible with RubyMotion. Not so sure about the ARC integration (last time I've checked cocos2d was only "ARC compatible"). I've seen some work arounds using a cocos2d as a static library (no ARC enabled) linked with a main Objective-C application that uses ARC. It should work ... but I can't give you a final answer.