2009-07-17 62 views
0

獲取奇怪的錯誤。剛安裝了Typus rails管理插件,該插件應該在2.3.2中工作。但是,安裝後似乎與我的用戶模型混亂。不知道從哪裏開始,有什麼想法?安裝Typus rails插件後的`load_missing_constant'

=> 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需要」 從腳本/服務器:3

回答

1

是否使用restful_authentication?

如果是這樣,那麼restful_authentication提供的'Authentication'模塊和包含在Typus中的'Authentication'模塊之間會有名稱衝突。

我將所有對restful_authentication模塊的引用從Authentication更改爲RestfulAuthentication,並更改了vendor/plugins/restful_authentication/lib/authentication.rb中的模塊名稱。不確定是否有更好的方法來指定模型應該使用哪個模塊。

0

或者,你可以用::清理的差異前綴寧靜認證,

::的

身份驗證,而驗證