The ridge board that is showing there is likely just fine. The ridge board does not do much in holding up the roof. It becomes a place to butt the rafters up to and nail in their ends. It also played a big role during the original construction to keep the spacing between the rafters correct.
The roof is actually held up by the triangle formed by each pair of opposing rafters and the ceiling joist or rafter tie attached across the width of the building at the point where the rafters sit on the top plate of the supporting wall. In this whole scheme the ridge board basically sits in compression between the upper ends of the rafters.
The failure with the rafters that you see there was caused by excessive weight placed on top of the roof at some point. Seeing in your photo that the old rough roof boards were covered over with a sheeting of OSB material that looks far newer it is a very good guess that the roofing was replaced. It is likely that at the time the roofing job was done that the contractor or a sub agent hoisted a whole pallet of shingle bundles up onto the roof deck just over where those two rafters have failed. Concentrated piles of shingle bundles are extremely heavy and my guess is this is what caused the joint between the rafter and the ridge board to fail.
Fixing this will indeed require adding a new rafter along side these broken ones that reestablishes the proper joint with the ridge board and pushes up the roof deck to where it should be.