Error for uuid

hi all,
i am getting following error when running my code .Is anyone who knows who to install uuid gem ? or what are gems required before install uuid gem ?

“no such file to load – uuid”

Ruby On Rails version using :-
gem :1.7.2
ruby:1.8.7
rails:2.3.4

Thanks and Regards
Sachin S. Kewale

Are you trying to use uuid values? If not then there should be no
need for anything. Post the full error and trace if you do not think
you are using uuid values. First though search your source code for
'uuid'.

If you are using uuid values show us the code that uses it and tell us
which version of rails you are using.

Colin

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
			new_temp_user.first_name = new_user['first_name']
			new_temp_user.last_name = new_user['last_name']
			new_temp_user.user_name = new_user['email_id']

			new_temp_user.password = new_user['user_pwd']
			new_temp_user.email_id = new_user['email_id']

no such file to load -- uuid

RAILS_ROOT: D:/Documents and Settings/Administrator/My Documents/Aptana RadRails Workspace/suggestica

Application Trace | Framework Trace | Full Trace

[D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=%3CA%20href=)

[D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb&line=36)

[D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb&line=156)

[D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb&line=521)

[D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb&line=156)

[D:/Documents and Settings/Administrator/My Documents/Aptana RadRails Workspace/suggestica/app/controllers/suggestion_controller.rb:35 ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Documents%20and%20Settings/Administrator/My%20Documents/Aptana%20RadRails%20Workspace/suggestica/app/controllers/suggestion_controller.rb&line=35)

[D:/Documents and Settings/Administrator/My Documents/Aptana RadRails Workspace/suggestica/app/controllers/home_controller.rb&line=52">](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Documents%20and%20Settings/Administrator/My%20Documents/Aptana%20RadRails%20Workspace/suggestica/app/controllers/home_controller.rb&line=52)[D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb&line=36)

[D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb&line=36)

[D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb&line=156)

[D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb&line=521)

[D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb&line=156)

[D:/Documents and Settings/Administrator/My Documents/Aptana RadRails Workspace/suggestica/app/controllers/suggestion_controller.rb:35 ](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Documents%20and%20Settings/Administrator/My%20Documents/Aptana%20RadRails%20Workspace/suggestica/app/controllers/suggestion_controller.rb&line=35)

[D:/Documents and Settings/Administrator/My Documents/Aptana RadRails Workspace/suggestica/app/controllers/home_controller.rb:52:in `index'](http://org.eclipse.ui.intro/runAction?pluginId=org.radrails.rails.ui&class=org.radrails.rails.internal.ui.browser.OpenEditorAction&path=D:/Documents%20and%20Settings/Administrator/My%20Documents/Aptana%20RadRails%20Workspace/suggestica/app/controllers/home_controller.rb&line=52)

This error occurred while loading the following files:
uuid

Request

Parameters:

None

Show session dump

Response

Headers:

{"Content-Type"=>"",
 "Cache-Control"=>"no-cache"}

hi all,

i am getting following error when running my code .Is anyone who knows who

to install uuid gem ? or what are gems required before install uuid gem ?

“no such file to load – uuid”

Are you trying to use uuid values? If not then there should be no

need for anything. Post the full error and trace if you do not think

you are using uuid values. First though search your source code for

‘uuid’.

If you are using uuid values show us the code that uses it and tell us

which version of rails you are using.

Thanks and Regards
Sachin S. Kewale

There is no native support for uuid in rails as far as I know. I
believe there are gems available to provide this, though I have not
used them, google should help you find them. If you picked up this
code from an example or tutorial have a look at it and see if it makes
a recommendation.

Do you really need uuids though?

By the way, if you need to use rails 2.3 you should at least use the
latest 2.3.x (11 I think) as there were some security fixes. If you
are writing a new app then best to use 3.1

Colin

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

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