Firstly, somatotypes are completely bogus. The idea of ectomorphs, mesomorphs and endomorphs was originally used for psychology not fitness.
If you aren't gaining weight like you want, you are not eating enough - it is as simple as that. Advice for gaining weight is exactly the same as advice for losing it - measure everything you eat and weigh yourself at the same time under the same conditions.
If you want to gain weight, you need more healthy calories. To build more muscle you need to ensure you are working your muscles actively, which a strength program should do, and make sure you are eating adequate protein.
As a vegetarian this is slightly easier than being a vegan, but I'll cover both (and pescetarianism and complete omnivores too). You need to ensure you are getting a complete protein complex throughout the day - at the same meal is less important than just ensuring you are getting the right essential amino acids.
If you aren't vegan, animal proteins have all essential proteins required for humans, so eat as much of those in the types you feel comfortable with.
- If you eat all types meat, eat meat of your choosing - but mix it up with some of the options below. There are ecological, ethical and financial reasons that making reducing (but not necessarily eliminating) meat in your diet a good choice - plus who doesn't love a change.
- Piscatarians - eat lots of fish, fresh water sustainable fish is best as its less damaging ecologically, and you are less likely to have issues with mercury accumulation in the future as is common in top-level seafood such as tuna.
- Vegetarians - dairy and eggs are your friends. Yoghurt, milk, cheese are high in calories and rich in protein.
If you are vegan (or looking for an ethical/culinary/financial change), protein intake can be more chanllenging. Very few plant sources contain complete proteins, but they do exist. Two common plant-based complete proteins are Buckwheat is common in Japanese cuisine and used in the production of soba noodles, and Quinoa a South-America pseudo-grain that can be cooked an eaten in a similar fashion to rice.
However where such plant-based complete proteins don't exist, most cultures have by chance stumbled upon culinary choices that lead to food sources that when eaten provide complete proteins. The gist of these dietary patterns is that by eating a balanced amount of grains and legumes - like rice,corn or wheat with beans (as seen in lots of Central American food) or rice and soy (as in a lot of South-Asian food) - you should get all of the amino acids you need.
As JohnP points out below, the idea of "protein combining", the theory that foods with incomplete proteins must be eaten together to adequately build a complete protein is has been refutued in all scientific literature. There is no reason that you can't eat a serve of rice at lunch, and a serve of beans with dinner to meet your protein requirements. However, people often eat these protein sources together either for convenience or for purely culinary purposes.