Based on your question, I am assuming that your RV Refrigerator works fine on electric. I am afraid that there could many causes to your problem including but not limited to a bad Control Board, a bad Igniter, etc.
If you feel comfortable doing so you might want to check out the igniter. Make sure that it is properly connected and that the connection is tight and not corroded. You can also check the gap on the igniter to make sure that it is not corroded or dirty.
You might want to also take a look at the video below from Pedata RV Center to learn a little bit more about routine RV Refrigerator Maintenance.
Everything-About-RVing.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.