views:

325

answers:

2

Getting an odd error. Just installed the Typus rails admin plugin, which is supposed to work in 2.3.2. However, after install it seems to mess with my user model. Not sure where to start here, any ideas?

 => Booting Mongrel
    => Rails 2.3.2 application starting on http://0.0.0.0:3000
    /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Typus::Authentication::ByPassword (NameError)
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing'
        from /Users/apple/Sites/app/app/models/user.rb:10
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:380:in `load_file'
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:379:in `load_file'
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:259:in `require_or_load'
        from /Users/apple/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:425:in `load_missing_constant'
         ... 35 levels...
        from /Users/apple/.gem/ruby/1.8/gems/rails-2.3.2/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

+1  A: 

Are you using restful_authentication?

If so, there's a name conflict between the 'Authentication' module restful_authentication provides and the one included in Typus.

I renamed all the references to restful_authentication's modules from Authentication to RestfulAuthentication, and changed the module name in vendor/plugins/restful_authentication/lib/authentication.rb. Not sure if there's a better way to specify which module the model should use.

bdon
A: 

Alternatively, you can prefix the Restful Authentications with :: to clear up the discrepancy,

::Authentication instead of Authentication