How long should you leave ribs on the grill?

Depends on how you cook them.

I always smoke ribs over indirect heat and cook for at least an hour. I flip them every 15 minutes and baste with homemade sauce.

If smoking them, don't freak out if the meat inside is pink as that's how it should be. The meat should pinken from the outside in due to the smoking process.