Whichever way you look at it, the overall fact remains that you will put on pounds if your calorie intake supersedes your bodily requirements.
To gain weight, keep track of your calorie intake. This includes during meal times and when snacking and your daily activity level.
You can then calculate how much energy you take in per day versus how much you expend to know by how much to increase your calorie intake for moreweight gain.