If you don't really need a real uuid, you could just gen something
similar yourself using ActiveSupport::SecureRandom.hex:

  ...
  def gen_uuid_ish
    s = ActiveSupport::SecureRandom.hex(16)
    [ s[0..7], s[8..11], s[12..15], s[16..19], s[20..-1] ].join('-')
  end
  ...

which will produce strings like "3ec1a6a0-017a-8fb4-0c26-56858ddc3886"

Jeff

On Dec 8, 4:54 am, Peter Vandenabeele <[email protected]> wrote:
> On Thu, Dec 8, 2011 at 12:25 PM, sachin kewale <[email protected]>wrote:
>
> > MissingSourceFile in HomeController#index
>
> > hi Colin ,
> > following is the full trace error and in my code i am using Rails version 
> > 2.3.4
>
> > and here is the code where i am using uuid
>
> > new_temp_user.creation_date = Date.today
> >                    new_temp_user.guid                      = UUID.new
>
> On Rails 3 you could use:
>
> in Gemfile:
>
> gem 'uuidtools'
>
> in the code:
>
> UUIDTools::UUID.random_create.to_s
>
> I am not sure how well this would work in Rails 2.3.x
>
> HTH,
>
> Peter

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to