If you can't gain weight, then you probably belong to the ectomorph somatotype, which consist of generally tall and lean people. If you're a female, then this is probably a good revelation because it means you won't really have to worry about gaining fat. For males, however, it is quite the opposite: for a lot of ectomorphs, it's difficult to gain weight. That doesn't mean it has to be for you.
As an ectomorph, you won't need to worry about general fat consumption, since your body will burn through it like gasoline. You'll still want to watch certain fats, however, because they can lead to high cholesteral. No sort of metabolism will make you immune to that, although it can help you resist it. As an ectomorph trying to gain weight, I ate a ton of hamrburgers and drank a lot of milk. Those two things were my godsend. Well, no I take that back, peanut butter was really good too. It has a high number of calories and a good amount of protein.
Another thing in regard to the ectomorph metabolism is that you'll want to make sure you eat a lot of carbs. If you don't have enough energy to fuel the reconstruction of your muscles, then the proteins will just turn into fat. I recommend a high carb diet for any skinny guy I know, just because it's so effective in helping them gain weight. For some reason, the issue is generally carb consumption, not protein consumption.
Do little cardio. You should have good endurance already, so you really shouldn't be doing much cardio. You'll want to do a little bit at the beginning of a workout to make sure you loosen up and prepare yourself for the coming stress on your muscles, but you'll really want to be careful of how much cardio you do. If you can't gain weight, then it might be because you're running too much. Since you have so little fat, your body will go into a catabolic state more quickly and will actually eat away at your muscles as you run - you don't want that to happen!
To recount:
Good luck fellow ectomorphs!
To find out more information on how to put on muscle fast, even if you're a hard gainer, go here: Natural Muscle Gain