So you want to generate ISO8601 formatted timestamps in Ruby, but need resolution finer than a second?
First, make sure to require 'time'
in order to get ISO8601 formatting. But that gets you this:
2.1.0 :001 > require 'time'
=> true
2.1.0 :002 > Time.now.utc.iso8601
=> "2015-11-12T04:46:43Z"