I need to generate uuid for my rails application. What are the options(gems) I have?

guid, ruby, ruby-on-rails, ruby-on-rails-3, uuid

Solution

There are plenty of options, I recommend not to add additional dependencies and use `SecureRandom` which is builtin:

SecureRandom.uuid #=> "1ca71cd6-08c4-4855-9381-2f41aeffe59c"

See other possible formats here.

Problem

I use Rails 3.0.20 and ruby 1.8.7 (2011-06-30 patchlevel 352) Please suggest me the best plugin to generate guid.

Original source

Related problems