There is nothing wrong with naming a boy
Riley, but if you are in the USA you should know that
Riley is now twice as common for girls as it is for boys. So an American boy named
Riley will have to be supported when he is teased about having a "girl's name."
Personally I would prefer
Joshua as a middle name to
Ray, because
Riley Ray would too easily be heard as "
Riley Rae" and so sound even more like a girls' name to many.