Rangers boss Stuart McCall says he feels sorry for Gael Bigirimana, but admits he should never have been signed.
Chris Gunter will stay at Reading, after the club took up the option to extend his deal by another year.
Riera has been with the Catalan giants for nine years and captained the club at all youth levels, but the 19-year-old was told by Barcelona B at the end of last season that he would not be offered a new contract.
The centre-half becomes Forest's fourth summer signing following fellow defender Louis Laing and strikers Matt Fryatt and Lars Veldwijk to the City Ground.
He said via his Twitter account: "Today I start a new chapter in my life at NFFC. I'm really excited about this new project and I'm gonna give all for this team. Thanks so much for the messages I've received."