I just run the code on a quick setup and it works fine.
Are you using the mentioned library, there are at least two I know of with the same name. Do you have another Rotary library on your computer by any chance?-- Rob G4NQX