Don't try to gain weight: Deliberate weight gain is a fool's game - it's very hard to do it "correctly", and the benefits of doing it "correctly" are dubious at best.
This is just incorrect. Gaining weight is an essential part of gaining muscle!
Yes, if your goal is to maximize muscle mass, gaining weight is pretty much necessary. My point is aiming to maximize muscle mass is generally a bad goal that leads to counterproductive and unhealthy behavior.
Proper hard gaining takes lots of discipline and time, which is difficult for more advanced lifters to manage, much less someone just starting out like the OP. And the bulking/cutting phases many lifters go through to achieve hard gains are pretty much yo-yo dieting in reverse, which is terrible for your organs and metabolism. And even after "successful" hard gain, the payoff is additional muscle weight straining your joints and organs and negatively impacting your overall health.
Long story short, unless you start off significantly underweight, gaining weight is virtually always a net decrement on your health, even if that weight is entirely muscle, which again is really hard to pull off. And the major weight oscillations involved in most gaining programs have significant short- and long-term health consequences as well. Anyone of normal weight has the bulk to attain a fit, muscular build without manipulating their weight.
I suppose ultimately a lot depends on whether the OP's lifting goals are mainly cosmetic or health-based. If they're cosmetic, though, it's also important to note that research shows men consistently overestimate (by 15-25%) the muscularity of the builds women find most attractive.