Answer :
It means that a person has spent a lot of time and effort to fit into an organization or a group with a lot of enthusiasm and hope. But he/she has learnt only after a significant amount of time that he/she would not fit into that group or organization.
So that person has to look for some thing else and his time and effort has been wasted.
So that person has to look for some thing else and his time and effort has been wasted.