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 /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?