Those moves, along with the flu spreading through the Red Sox clubhouse, will force the team to piece things together for its series against the Tigers that begins in Detroit on Friday.
Brock Holt was cleared by the club on Thursday after getting the flu and will likely split time with Hernandez at shortstop during the series. Hernandez hit .377 with eight doubles and eight RBIs in Spring Training.
Mookie Betts, who missed Wednesday's game against the Pirates due to flu-like symptoms, will travel with the team. Left-hander Robbie Ross Jr. was placed on the 10-day disabled, retroactive to Monday, because of the flu. Infielder Deven Marrero was recalled from Pawtucket.
Barnes, who led the Red Sox in relief appearances in 2016, appeared in Boston's first two games this season. He allowed one hit and one walk in Monday's opener and threw a scoreless inning Wednesday. Barnes pitched to a 4.05 ERA in 62 appearances in 2016.
Ramirez owns a 5.19 ERA in 31 career appearances, all out of Boston's bullpen over the past two seasons.
Boston's series finale against Pittsburgh was postponed Thursday, and it will be made up April 13 at 2:05 p.m. ET.
Quinn Roberts is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.