# Issues with rails\_authentication --include-activation

**URL:** <https://discuss.rubyonrails.org/t/issues-with-rails-authentication-include-activation/47415>\
**Category:** rubyonrails-talk\
**Created:** [November 9, 2009, 1:54am UTC](https://discuss.rubyonrails.org/t/issues-with-rails-authentication-include-activation/47415 "2009-11-09T01:54:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Al11](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Al11](https://discuss.rubyonrails.org/u/Al11)\
**Post date:** [November 9, 2009, 1:54am UTC](https://discuss.rubyonrails.org/t/issues-with-rails-authentication-include-activation/47415/1 "2009-11-09T01:54:33Z")

</div>

Hello,

So I installed the restful\_authenticaiton plugin on an empty rails 2.3.4 project.

$ script/plugin install restful\_authentication

Generated files using "Students" as my model (instead of the often- used "Users"). Note that I've added the --include-activation flag.

$ ./script/generate authenticated students sessions --include- activation

And after editing my environment.rb with the line: config.active\_record.observers = :student\_observer # or whatever you

I get the following output when trying to run script/server

$ ./script/server =\> Booting WEBrick =\> Rails 2.3.4 application starting on [http://0.0.0.0:3000](http://0.0.0.0:3000) /Library/Ruby/Gems/1.8/gems/ activesupport-2.3.4/lib/active\_support/dependencies.rb:443:in load\_missing\_constant': uninitialized constant StudentObserver (NameError)

from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/dependencies.rb:80:in `const_missing' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/dependencies.rb:92:in `const\_missing' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/inflector.rb:361:in `constantize' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/inflector.rb:360:in `each' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/inflector.rb:360:in `constantize' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/core_ext/string/inflections.rb:162:in `constantize' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active\_record/ observer.rb:38:in `instantiate_observers' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ observer.rb:36:in `each' from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active\_record/ observer.rb:36:in `instantiate_observers' from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/ action_controller/dispatcher.rb:15:in `define\_dispatcher\_callbacks' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/callbacks.rb:182:in `call' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/callbacks.rb:182:in `evaluate\_method' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/callbacks.rb:166:in `call' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/callbacks.rb:90:in `run' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/callbacks.rb:90:in `each' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/callbacks.rb:90:in `send' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/callbacks.rb:90:in `run' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/callbacks.rb:276:in `run\_callbacks' from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/ action\_controller/dispatcher.rb:51:in `send' from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/ action_controller/dispatcher.rb:51:in `run\_prepare\_callbacks' from /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/initializer.rb:631:in `prepare_dispatcher' from /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/initializer.rb:185:in `process' from /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send' from /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run' from /Users/aarz/Sites/50forthefuture/branches/heroku3/config/ environment.rb:9 from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active_support/dependencies.rb:521:in `new\_constants\_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/ active\_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:84 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem\_original\_require' from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in `require' from ./script/server:3

What step might I have missed to get this error?

---

<div class="post-metadata">

**Author:** ![Rick3](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@Rick3](https://discuss.rubyonrails.org/u/Rick3)\
**Post date:** [November 11, 2009, 6:48pm UTC](https://discuss.rubyonrails.org/t/issues-with-rails-authentication-include-activation/47415/2 "2009-11-11T18:48:15Z")

</div>

If you specify :student\_observer your "script/generate" should be:

script/generate authenticated student sessions --include-activation

NOTE: student not students
