Considering imperfect successive interference cancellation (SIC) for non-orthogonal multiple access (NOMA) communications, this work studies the cooperative reconfigurable intelligent surface (RIS)- and relay-assisted system under Nakagami-m fading. We focus on the performance comparison for such cooperative schemes, under different channel conditions and system parameters. In addition, we analyze the minimum required RIS elements number of the RIS-assisted scheme to achieve the same performance of the relay-assisted scheme with given signal-to-noise ratio (SNR). The cases of the optimal continuous phase shift and discrete phase shift designs of RIS are also discussed. We make a comparison between them, aiming to study the impact of the residual phase errors on performance. Specially, we compare the active RIS and passive RIS with the same system power constraint. Simulation results demonstrating the reliability of the analysis, validate that the relay-assisted scheme is superior to that of RIS-assisted one when the RIS elements number is small and transmitted power is lower. The results also confirm that the deployment of RIS should consider the actual situation of the application scenario.