How long should you leave ribs on the grill?

If you were cooking 2 racks of baby back ribs(4-5 pounds total), you should cook the ribs indirectly and cook them 1-1/4 to 1-1/2 hours total. Make sure the ribs are well-browned and cooked through, yet tender enough to pull apart with your fingers. When the ribs are cooked, the meat will have shrunk back from the ends of the bones by about 1/4 inch.(from BBQ University)