The Brazilian played under Ancelotti when the Italian was in charge at Stamford Bridge, and in recent days the 27-year-old has been linked with a move to the Bernabeu.
Ramires has added fuel to the speculation by lavishing praise on the experienced boss.
"Ancelotti is a special coach for me, and I really appreciate him," Ancelotti told Marca.
"He helped me a lot when I arrived at Chelsea and he was very important in helping me adapt to my position as a central midfielder. He's a very good coach."
Ramires is currently with the Brazil squad at the World Cup.