Small Tank=Very unstable, your pH could crash at any time and everything that can, usually goes wrong in a small tank like that 5G. If it does happen, Rams arent the hardiest of fishes to take it for a short period of time-and from that it will most probably die.
I doubt this will happen but IMO i think it should be taken into account
Good luckers