I would suggest using PostgreSQL and using the uuid column built in, it autogenerates UUID based on type you create the column.
Example in Rails 3 migration
execute <<-SQL
CREATE TABLE some_items (id uuid PRIMARY KEY DEFAULT uuid_generate_v1());
SQL
Might be a better way to do this in Rails 4.