Script/server gives the error

script/server gives the following error.

=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:105:in
const_missing': uninitialized constant User::Authentication (NameError) from /home/amrit/public_html/OSV/OpenStreetView/app/models/user.rb:4 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:380:inload_without_new_constant_marking’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:380:in
load_file' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_constants_in’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:379:in
load_file' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:259:inrequire_or_load’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:425:in
load_missing_constant' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:inconst_missing’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:92:in
const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:364:inconstantize’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:in
each' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/inflector.rb:363:inconstantize’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/string/inflections.rb:162:in
constantize' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/observer.rb:157:inobserved_class’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/observer.rb:183:in
observed_classes' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/observer.rb:166:ininitialize’
from /usr/lib/ruby/1.8/singleton.rb:94:in new' from /usr/lib/ruby/1.8/singleton.rb:94:ininstance’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/observer.rb:38:in
instantiate_observers' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/observer.rb:36:ineach’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/observer.rb:36:in
instantiate_observers' from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:15 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:182:incall’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:182:in
evaluate_method' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:166:incall’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in
run' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:ineach’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:in
send' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:90:inrun’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/callbacks.rb:276:in
run_callbacks' from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:51:insend’
from
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:51:in
run_prepare_callbacks' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:631:inprepare_dispatcher’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:185:in
process' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:insend’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in
run' from /home/amrit/public_html/OSV/OpenStreetView/config/environment.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in
new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from script/server:3

Please somebody help !!


Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com

On 13 February 2012 13:58, Amrit Pal P. [email protected]
wrote:

script/server gives the following error.

=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:105:in

`const_missing’: uninitialized constant User::Authentication
(NameError)
from /home/amrit/public_html/OSV/OpenStreetView/app/models/user.rb:4

Amrit, you have been asking questions here long enough by now to know
that if you get an error from your code saying a problem at user.rb
line 4 that showing us the first few lines of that file may be
helpful.

Colin

On Mon, Feb 13, 2012 at 7:42 PM, Colin L. [email protected]
wrote:

Amrit, you have been asking questions here long enough by now to know
that if you get an error from your code saying a problem at user.rb
line 4 that showing us the first few lines of that file may be
helpful.
require ‘digest/sha1’

class User < ActiveRecord::Base
include Authentication
include Authentication::ByPassword
include Authentication::ByCookieToken
include Authorization::AasmRoles

validates_presence_of :login
validates_length_of :login, :within => 3…40
validates_uniqueness_of :login
validates_format_of :login, :with =>
Authentication.login_regex, :message =>
Authentication.bad_login_message

validates_format_of :name, :with =>
Authentication.name_regex, :message =>
Authentication.bad_name_message, :allow_nil => true
validates_length_of :name, :maximum => 100

validates_presence_of :email
validates_length_of :email, :within => 6…100 #removed_email_address@domain.invalid
validates_uniqueness_of :email
validates_format_of :email, :with =>
Authentication.email_regex, :message =>
Authentication.bad_email_message


Thanks

Regards

Amrit Pal

amritpalpathak.blogspot.com

On 13 Feb 2012, at 15:35, Colin L. wrote:

know
that if you get an error from your code saying a problem at user.rb
line 4 that showing us the first few lines of that file may be
helpful.
require ‘digest/sha1’

class User < ActiveRecord::Base
include Authentication

So what have you done to make this file available? Where have you
put it?

My guess is he switched from restful_authentication to devise and just
left all the cruft from restful_authentication in there. Or maybe the
restful_authentication gem isn’t specified in the Gemfile.

Best regards

Peter De Berdt

On 13 February 2012 14:28, Amrit Pal P. [email protected]
wrote:

Amrit, you have been asking questions here long enough by now to know
that if you get an error from your code saying a problem at user.rb
line 4 that showing us the first few lines of that file may be
helpful.
require ‘digest/sha1’

class User < ActiveRecord::Base
include Authentication

So what have you done to make this file available? Where have you put
it?

Colin