The loss of a nutrition bar manufacturing contract has led US food group Ralcorp Holdings to decide to close a production facility.