ensure shakes?

I'm having a hard time gaining during my pregnancy in fact I'm actually losing weight. Would it be safe to take ensure shakes to provide nutrients to my baby and help with weight gain?  Has anyone tried it?  Fruits and veggies just aren't working.
Thanks!