Surprisingly Ruby doesn’t come with a built in GUID generator. Thankfully there is the useful uuid project which implements a gem that you can easily install and use to generate GUIDs.
1. gem install uuid
2. require 'uuid'
3. UUID.new
Gems rock.
Surprisingly Ruby doesn’t come with a built in GUID generator. Thankfully there is the useful uuid project which implements a gem that you can easily install and use to generate GUIDs.
1. gem install uuid
2. require 'uuid'
3. UUID.new
Gems rock.
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)