Rate fairness is fundamental importance to ensure the quality-of-service (QoS) in vehicular networks. In this paper, we explore the rate fairness maximization (RFM) in a vehicular network including multiple vehicle-to-infrastructure (V2I) pairs and vehicle-tovehicle(V2V) pairs. Based on this goal, we first formulate the RFM as an optimal problem with the constraints of the resources of spectrum and transmit power, and QoS requirements. To solve this challenging nonlinear and nonconvex optimization problem, we model the spectrum sharing and the transmit powers for V2V and V2I users as a Markov decision process. Then, we propose a deep reinforcement learning (DRL) algorithm to maximize the rate fairness while meeting the QoS requirements by optimally allocating spectrum and transmit power resources. Finally, we conduct simulation study to illustrate the impact of some key parameters on the rate fairness performance.