Yes, you can be rich and be happy! And yes, you can be rich and be miserable. You can be poor and be miserable too, and you can be poor and be happy. But you must learn to be happy NOW no matter what the situation or condition is, even if you are totally poor. Money/riches will not make you happy.
If you seek money first while you are miserable, you may end up with money, but you will still be miserable. Being happy first will allow you to have money AND be happy. But if you seek riches while you are miserable thinking that the money will make you happy, you will be disappointed when you get the money.