I don't know how to code in Ruby, but I know where you need to get the Duplex API Key from:
http://www.chromium.org/developers/how-tos/api-keys
Here is some PHP code to look at how to do it. I just prefer the old API personally and still use it:
http://mikepultz.com/?wpdmact=process&did=MS5ob3RsaW5r
I would give you an example in Ruby, but I don't know how to code in Ruby so here is just a coding example on the subject.
I hope this helps. - Skylion