When I began losing weight due to nausea, (2005, it was in the Autumn), I ate ice cream. A pint on most days. Ate cheeseburgers and bacon. Pork rinds with various calorie filled dips.
When I needed to gain weight after my century of boozing (no, it was not actually a century, just felt like it), I used a product sold over the counter called Wate-On. It's a strange emulsion (fluid) which indeed upped my weight. About 25 pounds. It was something to be mixed with milk (I suppose it could be taken straight from the bottle, not sure).
In 2009 i was forced to drink something called Ensure. It can be found in grocery stores and pharmacies. This was after about a month with no food, just a friendly IV Drip in a hospital. There is a sugar free formula for diabetes mellitus sufferers too...speak to your doctor.
The bottom line is there are plenty of ways to go but your best bet would be to talk to your doctor. They in turn may run some tests to rule out some sort of illness or disease. They might also refer you to a nutritionist. A nutritional counselor.
Don't take and acceptany
medical advice from the internet. Even my stuff, which might be all wrong for you. People on the internet, do not know anything about your actual health. See a doctor!
Heed the advice jespah gave when you worried about your ribs.
Oh, yeah, see a doctor