Governor Lincoln Chafee signed a bill into law yesterday that allows gay couples in Rhode Island to enter into civil unions, acknowledging that it was an imperfect piece of legislation but a “step forward’’ toward full marriage rights. Chafee said the bill fails to give homosexual couples the full marriage rights given to heterosexual couples and that he was concerned that an exemption given to religious groups was too broad. But he added that the legislation “brings tangible rights and benefits to thousands of Rhode Islanders.’’ The General Assembly voted Wednesday to approve civil unions. Gay rights groups urged Chafee to veto the measure, saying it continued discrimination against gays. The Roman Catholic Diocese of Providence denounced the Assembly vote.