What is the meaning of [Chasing rainbows]

Following dreams, trying to do something that can’t be achieved. “His paintings have neither style nor imagination, but he insists on being a professional painter. He’s always chasing rainbows.”