if RUBY_VERSION == "1.8.7" module SecureRandom # this method doesn't exist in 1.8.7 so # we are faking it by using hex() def self.urlsafe_base64(args) self.hex(args) end end end