# Uninitialized constant error with restful authentication

**URL:** <https://www.ruby-forum.com/t/uninitialized-constant-error-with-restful-authentication/148064>\
**Category:** Rails\
**Created:** [September 8, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-error-with-restful-authentication/148064 "2008-09-08T22:21:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fromjavatorails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/71c47a/32.png) [@fromjavatorails](https://www.ruby-forum.com/u/fromjavatorails)\
**Post date:** [September 8, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-error-with-restful-authentication/148064/1 "2008-09-08T22:21:17Z")

</div>

I’m trying to set up restful authentication with Rails 2.1.0 on Mac OS X  
Leopard, and I had to comment out RAILS\_GEM\_VERSION in the environment  
file to install the plugin from technoweenie. Now I’m trying to follow  
along in a tuturial, and I’m stuck on this:

1. $ ruby script/generate scaffold Role rolename:string
2. 

/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:492:in  
`const_missing': uninitialized constant User::Authentication (NameError) 3. from /Users/naijaguy/Sites/rails_apps/testauthapp/app/models/user.rb:4 4. from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:215:in`load\_without\_new\_constant\_marking’  
5. from  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:215:in  
`load_file' 6. from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in`new\_constants\_in’  
7. from  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:214:in  
`load_file' 8. from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:95:in`require\_or\_load’  
9. from  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active\_support/dependencies.rb:260:in  
`load_missing_constant' 10. from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in`const\_missing’  
11. … 28 levels…  
12. from  
/Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/commands/generate.rb:1  
13. from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' 14. from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in`require’  
15. from script/generate:3

Was something (e.g. Authentication) not included when I downloaded the  
plugin? I added this line to my ApplicationController:

include AuthenticatedSystem
