It depends. You will have to file two tax returns, a Massachusetts resident return and a Rhode Island nonresident return. Since Massachusetts will provide you with a credit for the taxes you pay to Rhode Island, you would not have to pay Massachusetts tax if the Rhode Island tax covers the entire amount. Otherwise you could have a small amount due to Massachusetts.
Here is an FAQ on how to do a nonresident return in TurboTax: https://ttlc.intuit.com/replies/3302052