Hit a doozy of a bug in a rails app. Started to get some role authentication problems and having recently upgraded my app to use Rails 2.3.2 I updated the restful_authentication plugin by svn rm’ing the folder and then typing:
script/plugin install
http://svn.techno-weenie.net/projects/plugins/restful_authentication
Unfortunately that led to this error:
~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant User::Authentication (NameError)
from ~/project/app/models/user.rb:4
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:in `load_file'
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:in `load_file'
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:in `require_or_load'
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:in `load_missing_constant'
from ~/project/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `rake_original_const_missing'
... 32 levels...
from ~/project/vendor/rails/railties/lib/commands/generate.rb:1
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/generate:3
All over the googlesphere people have experienced this issue and nobody had a solution. In desperation I re-installed the plugin but this time using git from inside the vendor/plugins folder:
git clone git://github.com/technoweenie/restful-authentication.git
restful_authentication
And it works! Wow. I hope this saves anyone else a few hours. Good luck.