Lewis signed a contract with the Ravens on Monday, Jamison Hensley of ESPN.com reports.
The well-traveled Lewis, who has had stints with seven other teams in seven NFL seasons, will find a new home in Baltimore after spending the 2016 campaign in San Francisco. He'll join the training-camp roster in place of fellow quarterback Dustin Vaughan, who was waived in a corresponding move. Lewis will provide the Ravens with some more experienced depth behind injured starter Joe Flacco (back) during camp, but Lewis seems unlikely to win a 53-man roster spot if both Flacco and top backup Ryan Mallett are both fully healthy by the time Week 1 arrives.