The primary difference between a ruler and straightedge is that a ruler is a measurement device, whereas a straightedge is a tool for drawing or viewing straightness. A ruler is a straightedge with some scale on it so that it can act not only as a straightedge, but also as a device to measure distance. Therefore, a ruler is a straightedge, but a straightedge is not necessarily a ruler.
A straightedge is a straight instrument used to assist making straight lines for geometric figures. Essentially, this makes it a ruler without the measuring scale. Straightedges are commonly used in automotive and machining industries to determine whether or not machined mating surfaces are flat. Laser line levels can now utilize optics to accurately display a straight line on any surface and determine its straightness. In plane geometry, straightedges are used to draw lines between points, tangents to circles, and any other instance of a straight line. Rulers have multiple designs compared to the straightedge. Some, such as measuring tapes, are straight, L-shaped and retractable. Since the primary function of a ruler, compared to a straightedge, is to measure, some rulers are made curved or flexible so that they can measure the length of things other than straight lines.