Last Updated: February 25, 2016
· joshkerr

Create UUID's in Ruby with a few simple commands

Make sure you have the uuid gem installed:

gem install uuid

Then just do this:

require 'uuid'
uuid =
uuid_string = uuid.generate

Now you've got a string with a UUID in it. There are a lot more options available in this library so you should read up on the documentation.