The 29-year-old has been out of international cricket for nearly two years, during which time he served a six-month doping ban and survived an assault that left him in a coma with serious head injuries.
Ryder, who last played for the national team in February 2012, was named in the New Zealand XI for the November 27-29 match in Christchurch but was forced to withdraw on Friday after picking up minor injuries playing a first class match this week.
"Ryder suffered a minor patella femoral injury in his left knee while bowling during the first day and while this is making good progress there was minor discomfort as the game went on," a statement from his Otago team said.
"Ryder was also struck on the finger when batting, an injury that was then aggravated later in the game while fielding in the slips.
"While neither injury is considered serious, it has been decided that as a precaution Ryder will not play for the NZ XI."
The Otago team's physiotherapist, James Montgomery, said Ryder's best course of action was to rest to ensure neither injury developed into something more serious.
The first test of the series against West Indies is in Dunedin from December 3, although local media have reported that Ryder may not have been included until the limited-overs series begins on December 26.