The Cardinals are 3-1 on a seven-game western road trip and have reached 70 victories for the season.
Ryan's homer -- his second long ball of the season in 272 at bats -- came in the second inning. Pineiro (12-9) took over from there, carrying a two-hitter into the eighth inning.
Pineiro eventually loaded the bases with two away in the eighth and was replaced by Kyle McClellan, who got David Eckstein on a grounder to shortstop to end the threat.
Tim Stauffer (1-6) hit Matt Holliday to open the St. Louis second and Holliday moved to second on a ground out by Rick Ankiel. Mark DeRosa then drew a walk and Yadier Molina was also hit by a pitch to load the bases.
That brought up Ryan, who homered on a 3-1 pitch. Molina drove in the other St. Louis run with a ground out in the sixth.
After struggling early in the season, Pineiro has gone 6-0 over his last nine starts. He has given up three or fewer runs in all but one of those appearances.
Copyright 2009 by United Press International.