And yes, it will hurt. Bring a friend to talk to, or talk to your artist about whatever. Music can help. I'm not going to sugarcoat it, it's not pleasant - though it DOES get a bit better once your adrenaline kicks in. I asked both of my artists if they'd ever had anybody stop in the middle because it hurt too bad and they both said no... So I think you can do it ;) While most people say it hurts more over bone (like ribs) and less over the more squishy parts, I find the opposite is true. The tattoos on my hips weren't NEARLY as bad over the hip bone as over the more squishy part of my side. It was a much sharper pain. (I suppose over, like, an ankle bone would suck pretty bad, but). Also, the outline is the worst - if you're getting shading, especially coloring, it doesn't hurt as bad due to the different needles. (Really, the WORST part is near the end, when they have to wipe the blood/ink off your skin with a paper towel. After a few hours of the gun, your skin is just raw and THAT hurts. But then when you're done, and they spray it down with cool water... Oh boy does that part feel nice on it).
As for safety, you should be fine. Most reputable shops use either 1 time needles or they clean, sterilize, and autoclave their needles (cook it so dang hot that it kills anything on it). Feel free to ask, if it's a good shop they will be happy to explain it to you.
Second, it'll be a few weeks before you can ride. I mean, you COULD ride - but you do NOT want to risk cracking open your scabs. If the scabs come off, it pulls out the ink. And for the first week and a half or two, it'll hurt. Bad. I've got one on either hip/side and I had to invent come pretty creative ways to get into my car, as I had to bend sideways to do so! So, please, take time off of riding. You're paying a lot of money for this, the LAST thing you want is spotty color because you rode too soon. And being on your ribs, that's a pretty bendy part of the body, so it's better to be safe than sorry :)
On that note, wear loose clothes. Nothing that will rub on it. You don't want to keep it covered by a bandage or anything, so don't wear tight shirts that will cause too much friction. You can put a cool icepack on it (it will feel burning hot... After all, you DID just get pricked with a bunch of needles several thousand times. Your skin doesn't like that too much.) but do it through your clothing.
I'm sure the aftercare will tell you this, but I'll throw it out there. You'll want to keep a thin layer of ointment on it - A&D works well, it's what I've always used. You can get a big tube for cheap. Otherwise WalMart sells Tattoo Balm (though it's very overpriced). Any UNSCENTED lotion can work, but it doesn't stay on as long. You want a good thin layer, but you don't want your scabs to be damp with it or they slough off.
Try to avoid getting it too wet in the shower, and DO NOT scrub it. With your HAND, very VERY gently clean it with antibacterial handsoap, then rinse it off. Pat it gently dry so it doesn't bog down with water. Reapply a thin ointment layer when it's dry. Don't go swimming with it, either.
After a week or two, it will start peeling BAD. Like a REALLY bad sunburn or something. To the point that when you apply your ointment/lotion, you'll come off with flakes of scab/skin on your hands. As tempting as it is DO NOT pull off the peeling flakes! It will pull ink out if it's not ready to come off on its own. This is when it will start to itch. Bad. Again, DO NOT scratch it. Smack it through your clothes a few times - the pain will make the itch go away. Once it gets to this point you can switch from your ointment to an unscented lotion - I always used Aveeno or Lubriderm to keep it healthy, as it does start to get dry as the scabs heal.
Keep it out of the sun while it's healing, and after, be sure to slather it with sunscreen if it'll be exposed - sun makes it fade faster.
When it's healing, it will not look pretty. A tattoo never looks as good as it does the day you get it done. What it looks like during healing will vary, but mine looked pale, milky, spotty. Don't panic. This is normal. When it'd fully healed it will look fantastic. I'm glad you've thought long and hard about this... If I may ask, what is it you're planning on getting?
And feel free to ask if you've got other questions!
ETA: A lot of people will tell you you can skip some of these steps, or you can ride right away, or whatever. For sure, you can!. But in my opinion, you're paying a lot of money for art that's on your skin forever. You want to make absolutely sure it's going to heal to look the best that it can, so you can enjoy it for the rest of your life.