Stop thinking diet book and start thinking biology class. It is impossible to gain weight eating (nothing but) protein. Digestion and absorption do not work like that. You might deal with protein poisoning (look up "Rabbit Starvation"), but you won't get fat.
Your body needs protein, it needs fats and it needs ~SOME~ carbs.
In simple terms: In biology class we learned that the body releases insulin to do what? Reduce blood sugar... When you eat something with sugar in it (candy, soda, white rice, bread, pasta, etc) it raises your blood sugar level. Your body releases insulin to store that in your fat cells. You get fat.
If you eat 1,000 calories in a candy bar, you will get fatter.
If you eat 1,000 calories in white rice, you will get fatter.
If you eat 1,000 calories of salmon, prime rib, chicken, etc you will not gain weight. Your body has nothing to store in your fat cells.
Just eat a balanced mix of foods without (or with limited) simple carbs and you will never have to diet again.