Its simply boils down to eating enough quality foods.
Many people underestimate the amount of foods required to pack on lean muscle mass.
I have to eat 3000 calories a day. I consume 6-7 meals a day taken 3 hours apart.
Follow the link on how much carbs and protein you need to take. Once you have these figures you can adjust your intake to suit your needs. You many still fail to put quality mass on so simply increase the amount of carbs until you do. Likewise if you start gaining fat trim the carbs down until you. Protein provides the bricks and the carbs provide the energy to train and use the bricks (protein) to build muscle.
http://www.gain-weight-muscle-fast.com/diet-to -gain-weight.html
Be careful with the amount of cardio you do. Too much cardio will work against you when it comes to building muscle.
Get a fat caliper (Accu-measure) this will allow you to tell if your weight increase is muscle or fat. you can then tell if your eating too little or to much based on composition changes.
Finally two legal products that all BBers should use as basis for muscle growth is creatine and a quality protein shake.