In code
Generate a UUID in Ruby
SecureRandom.uuid ships with Ruby's standard library.
Ruby example
Ruby
require "securerandom"
id = SecureRandom.uuid
No install? Use the tool or API
Here's a fresh version 4 UUID generated right now — copy it, or call the API from any language.
b6df8212-2064-4c75-8058-e72a06c683ee
curl https://getuuid.sh/api/uuid