Non-orthogonal multiple access (NOMA) is considered a key technology for improving the spectral efficiency of fifth-generation (5G) and beyond 5G cellular networks. NOMA is beneficial when the channel vectors of the users are in the same direction, which is not always possible in conventional wireless systems. With the help of a reconfigurable intelligent surface (RIS), the base station can control the directions of the channel vectors of the users. Thus, by combining both technologies, the RIS-assisted NOMA systems are expected to achieve greater improvements in the network throughput. However, ideal phase control at the RIS is unrealizable in practice because of the imperfections in the channel estimations and the hardware limitations. This imperfection in phase control can have a significant impact on the system performance. Motivated by this, in this paper, we consider an RIS-assisted uplink NOMA system in the presence of imperfect phase compensation. We formulate the criterion for pairing the users that achieves minimum required data rates. We propose adaptive user pairing algorithms that maximize spectral or energy efficiency. We then derive various bounds on power allocation factors for the paired users. Through extensive simulation results, we show that the proposed algorithms significantly outperform the state-of-the-art algorithms in terms of spectral and energy efficiency.