You may be a textbook ectomorph, naturally slight in build. I am and for a year of my life, age nineteen to twenty I drank high calorie/high protein shakes and faithfully followed a comprehensive and grueling weightlifting program. I gained all of 1 to 2 pounds, less than one kilo. I gave up after that and accepted that I have a distance runners build, hence my avatar.
I'm guessing this is definitely NOT the answer you want and you may very well be luckier in a quest to build lean muscle mass- look at Leo DiCaprio in Titanic (1997) and compare his appearance now. I hope he didn't resort to anabolic steroid use to gain weight and I hope you don't get tempted to try them. Their systemic and TREMENDOUSLY destructive effects on the human body are too many to address here and the muscular gain from their use is not a worthwhile trade off.
Forgive me sincerely if I am presuming incorrectly but if you are looking to gain muscle because of some local hooligans who have are being aggressive with you then there are ways to handle that situation even if that means taking a martial arts course to let them know there are easier pickings than you.
If you want to be more physically attractive then just taking up an athletic endeavor- bicycling or running (I run) will accomplish that. Lance Armstrong is, bulging quadriceps notwithstanding, an ectomorph and he has to, figuratively, beat the ladies off with a stick. I know it is not to his disadvantage he has a handsome face and more money than God.
Even a scrawny fella like me gets flirted with in public. I'm poor and ridiculously shy. I have a handsome face though (are you listening ladies?? - no get away, I'm too bashful :hiding: ) Anyway, a weight training program with good nutrition will make you tremendously attractive with, if not an increase in mass, muscular definition and the very attractive qualities of confidence and positivity. Good luck, Hache!!!