While programming late at night I came up with the following solution (based off Simone's) for generating a unique GUID in Rails. I am not proud of it but it does work quite well.
while Order.find_by_guid(guid = rand(36**8).to_s(36).upcase).present?; end