The injury occurred during batting practice prior to Thursday's 6-3 win over the Houston Astros in Kissimmee.
"It was my last swing in the second round and I felt it grab," Ruf said. "I tried to get in the third round and couldn't even swing."
Ruf said that he had some discomfort for about a week.
"It wasn't to the point where I couldn't do anything or had to say something, but just a little, a normal tightness in the area," he said.
He said he was able to cope with it and felt he would be able to get through the initial discomfort.
"If I got loose and got swings in the cage, it was very manageable," he said.
As a means of comparison, Chase Utley was diagnosed with a "very mild grade 1 strain" last season and he missed 28 games. Ruf's is more severe.
With Ruf out, it could assure a spot for John Mayberry Jr., who has a $1.6 million guaranteed contract and would be a righthanded bat off the bench.
Two nonroster outfielders who could be on the opening day roster are Tony Gwynn Jr. and Bobby Abreu. Both have enjoyed strong springs.
Cliff Lee and Boston's Jon Lester looked in midseason form. Lee allowed two runs over six innings, striking out six and walking none. Lester threw 52/3 shutout innings.
Lee will have one more start before opening the season on March 31 at Texas against the Rangers.
"I feel strong, I feel healthy and I am ready to go," said Lee, who didn't throw a ball into the fifth inning.
Lee not only completed six innings, but he then went to the bullpen to throw more pitches.
"I think I threw 75 pitches [in the game] and that was the same I threw last time," he said. "I then threw 10-12 pitches [in the bullpen] and shut down."
Cole Hamels (biceps tendinitis and a fatigued arm) will throw a batting practice session on Saturday. Mike Adams (shoulder) and Jonathan Pettibone (shoulder) will pitch in minor league games, also on Saturday.