Mount your motor to the ruler, using nuts and bolts. Make sure that the motor mounting holes are on the same side of the ruler that the mounting bracket protrudes towards. The only mounting hardware that should be on the other side of the ruler are the screw heads. This ensures a low profile when the two sections of ruler move back and forth.
Attach that servo motor's horn, if you have not done so already. Use nuts and bolts to attach the other section of the ruler to the servo horn. Again, the screw heads should be facing inward towards the other set to ensure a low profile.