If you want to gain weight while training I would recommend the If It Fits Your Macros diet (http://iifym.com) and eating about 500 cals above you total daily energy expenditure (TDEE) coupled with a decent, tried and tested weight training program that incorporates progressive overload. Take a look at the FAQ on http://reddit.com/r/fitness
Thanks I'll look into this. For 3+ months I tried my best to eat well over my daily energy expenditure by drinking lots of juices and eating tons of pasta. I would just end up feeling bloated (I'm a guy) and have to cut down on actual food intake after a few days and my weight goes back to before. I know muscle gain is the best way to gain weight but I actually want a little more meat (I'm 5'8 and 135lb [~173cm/59kg])
If you want to put on muscle then follow a decent program and eat 1 g per pound of body weight of protein, 0.5 g per lb of body weight of fat and then set your carbs to give you a 300 to 500 calorie surplus. Don't drink your calories (well protein shakes are fine but chicken/tuna would be better), eat them. This might be of some help: https://www.reddit.com/r/Fitness/comments/4d6fg2/m_28_175_lb...