Ramirez fell to the ground in pain on the 2-2 pitch, but was able to finish the at-bat after being helped by trainers. He eventually earned a walk.
However, Ramirez was replaced that inning by Rusney Castillo, with Brock Holt moving from right field to left field.
The Red Sox are in a stretch of 13 straight games, so Farrell could possibly give Ramirez Wednesday night off to rest the knee.
His presence in the lineup would be sorely missed. He has been one of Boston's hottest hitters over the past month. Entering Tuesday, Hanley had eight hits in his past 17 at-bats, including a double and homer.
Todd Karpovich is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.