All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is a great sin to commit fornication in general and it is worse during the month of Ramadan, since one violates the sacredness of this month. Since the jurists strongly blame a person who has sex with his wife during the day of Ramadan, so just imagine how much worse will it be if one commits fornication? We seek refuge in Allah from this. No doubt, such an action constitutes an indication to one's misery and ill-being. So, we advise him to repent and seek Allah's pardon before it is too late and then Allah will hold him responsible and punish him in this world and in the Hereafter. One has to seek a permissible way to satisfy his own desires; i.e. marriage, since no one accepts such an action against his own family. So, one should not accept it to others.
As for the Islamic ruling, we state that one has to emancipate a slave, if possible; otherwise, he has to fast for two successive months. If again one cannot, he has to feed sixty needy persons as stated in Surah al-Mujadilah [Quran 58]. Also, one has to make up for the day he broke when he committed such an abominable deed.
Then, one has to conceal his misdeeds, to thank Allah who did not make him die on that bad state, to repent sincerely and to avoid what leads to such bad actions.
Allah knows best.