I have restful_authentication in use on an app and it has been working
fine, but I recently was changing the account creation flow and needed
to enable the UserObserver. I did so by including it in the
environment.rb (config.active_record.observers = :user_observer) and
Rails wouldn’t start.
I got the following error;
source/communitysites/vendor/rails/activerecord/lib/active_record/
base.rb:1672:in method_missing_without_paginate': undefined method
format_attribute’ for #Class:0x2256a14 (NoMethodError)
from /source/communitysites/vendor/plugins/will_paginate/lib/
will_paginate/finder.rb:164:in method_missing' from /source/communitysites/app/forums/models/post.rb:7 from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:216:in
load_without_new_constant_marking’
from /source/communitysites/vendor/rails/activesupport/lib/
active_support/dependencies.rb:216:in load_file' from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:355:in
new_constants_in’
from /source/communitysites/vendor/rails/activesupport/lib/
active_support/dependencies.rb:215:in load_file' from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:96:in
require_or_load’
from /source/communitysites/vendor/rails/activesupport/lib/
active_support/dependencies.rb:261:in load_missing_constant' ... 76 levels... from /source/communitysites/vendor/rails/activesupport/lib/ active_support/dependencies.rb:511:in
require’
from /source/communitysites/vendor/rails/railties/lib/commands/
server.rb:39
from script/server:3:in `require’
from script/server:3
I get the same error when all the contents of UserObserver are
commented out, but don’t get it if I load a different arbitrarily
named observer class. Adding some more debug statements to the Rails
dependencies code provided me this information;
Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails 2.1.0 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
Error while attempting to load ‘’. Removing partially loaded constants
([])…
Error while attempting to load ‘’. Removing partially loaded constants
([])…
Error while attempting to load ‘’. Removing partially loaded constants
([])…
Error while attempting to load ‘’. Removing partially loaded constants
([])…
DEPRECATION WARNING: config.action_view.cache_template_extensions
option has been deprecated and has no affect. Please remove it from
your config files. See Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. for
details. (called from send at ./script/…/config/…/vendor/rails/
railties/lib/initializer.rb:464)
Error while attempting to load ‘’. Removing partially loaded constants
([])…
Error while attempting to load ‘’. Removing partially loaded constants
([“Post”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“Post”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“Forum”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“Post”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“Post”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“Forum”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“User”])…
Error while attempting to load ‘’. Removing partially loaded constants
([“RAILS_GEM_VERSION”, “RedHillConsulting”, “Technoweenie”,
“RAILS_DEFAULT_LOGGER”, “NR_CONFIG_FILE”, “RPM_AGENT_ENABLED”,
“RPM_DEVELOPER”, “RPM_TRACERS_ENABLED”, “RAILS_CACHE”])…
Error while attempting to load ‘’. Removing partially loaded constants
([])…
Exiting
Error while attempting to load ‘’. Removing partially loaded constants
([“OPTIONS”])…
After which I get the error. I am not very familiar with the Rails
internals since I am fairly new to the platform as well as the Ruby
language. Any tips on approaches for troubleshooting this (apparent
dependencies issue) would be greatly appreciated.
Kevin