If you've actually broken a few ribs then it takes about 2 weeks for the ends of the bone to start to stick together. Any time after that is OK to start EASY exercise. I would stick to the trainer until you're sure that you'd be able to handle the bike if something (a front flat, a pothole, a car, etc.) requiring quick movements came up. It takes 6-8 weeks for a bone to completely heal.