The catcher, named in the All Star team last season, will be banned from the start of the 2013 season - allowing him to take part in spring training
The ban will take effect at the start of the 2013 regular season, allowing Ruiz to take part in spring training, and will sideline him until the end of April.
"I am sincerely regretful for my mistake in taking a prohibited stimulant," Ruiz said in a statement.
"I apologise to my teammates, the Phillies organisation, and the Philadelphia fans,
"I will serve the imposed 25-game suspension to begin the season and I look forward to returning to the field and working toward bringing a championship back to Philadelphia in 2013."
Panama's Ruiz enjoyed a career-best year for Philadelphia, hitting .325 with 16 home runs, 32 doubles and 68 runs batted in.
"The Phillies fully support Major League Baseball's Drug Program. We are disappointed by the news of this violation of the programme," said Phillies general manager Ruben Amaro junior
"We will support Carlos in an appropriate manner and move forward to achieve our goal to play championship-calibre baseball in 2013."