I imagine you've got the basic two piece rigid rail and rubber insert. I replaced about 12 feet on my boat, the aft foot and the transom.
D&R Marine sells it. In fact, I am pretty sure they are the only place you can purchase a match for the old rigid rail. Anyway, it's pretty easy to repair- the black insert is probably pretty stiff and weather worn, but you can still get it to come out of the channel. Remove it past the damaged part, then remove the screws and shimmy a piece of cardboard or Masonite between the hull and the rigid piece to protect the hull. Use a hack saw to cut it.
It's easiest to caulk the old screw holes and drill new ones, using caulk to seal those as well.
If you need to turn a corner with the rigid rail, a heat gun works well, as long as your careful and patient.