Trying to color each face of a mesh separately

Hi. I am following the instructions on this thread to try and color each face of a mesh separately but my test cube stays gray. I created a test project that you can download here that contains only a cube, camera, light and the script verbatim from the thread. I would appreciate any help understanding what am I doing wrong here. Thank you!

User robertbu that commented here is right. By adding the shader from this thread verbatim to a material, and the material to the cube, I got it to work.

Thanks!