The Red Devil is a hardy fish, and is typically one of the most aggressive. A 40G tank is too small for a RD. You might be able to keep it there to grow it out, but it won't survive in there long term -- and most of its tank occupants will probably be picked off long before that.