Use a square against the face of the miter gauge to place and align the rip fence. The miter gauge can be inserted backwards to gain extra clearance with the blade, if necessary.
I used a piece cut from the end of a sheet of plywood for my rip fence and clamped it to the front and back of the saw table with "C" clamps. ("G" cramps in the UK) My rip fence was about 4 inches wide. The factory edge on a sheet of plywood is very straight and true. In the photo some commonly available shelving serves as a rip fence.