I've actually posted about 7 questions on here about how to get them to stop moving. Starting at about 20 weeks in my pregnancy my ribs began to hurt really bad so I asked my doctor about it.
You're ribs are going to hurt because they are expanding and stretching around to make room for your little one to move around and grow. There's no real way to stop the pain, I've tried everything.
What I would suggest is:
Take some tylenol, then soak in a warm bath for about a half hour, after your SO (if you have one) rubs your stomach & rib cage area with some lotion but make sure the SO is gentle because sometimes is hurts, then wrap an ace bandage around your stomach and back just in the area it hurts, then lay on a heating pad for a bit.
That helps me, it's like a daily routime at my house :)
Good luck & I hope you feel better!
at 9:55 AM on Dec. 18, 2008