I am assuming that the whole state is under equillibrium since nothing else [like angular velocity or anything] has been mentioned.
In that case, you need to draw a free body diagram. Here there are two unknowns with you: The Tension in the string and the frictional force. So, we can use two conditions, that of transitional equillibrium and rotational equilibrium to calculate these two values.
also, the tension can be broken into two components, One along the ruler (or parallel to it) and one perpendicular to it. The parallel component will not produce any torque on the ruler, but the perpendicular will contribute fully. However, do note that the parallel component will provide us with the needed Normal force on the ruler, which is necessary for friction to act.
It is a good idea to compute Torque along the point where atleast one force acts [the weight, the frictional force or the Tension]. When you do so, the force does not give any torque to the ruler and hence it can simplify the problem a bit.
Get two equations from these conditions, solve it and you shall have your answer. This diagram should help you:
http://img390.imageshack.us/img390/8633/rulerfbdaz3.jpg
P.S: IMHO, this is a nice question...