我在Glassfish上部署我的Jruby Rails應用程序,acts_as_audited
作爲安裝的gem/plugin。未定義的方法`cache_sweeper'爲ActionController :: Base:Class - warbler
每當我嘗試審計我的模型,我將得到以下錯誤。
我的環境是:JRuby的1.6.0.RC2來說,Rails 3.0.3
你可以參考這裏,如果你們想要看更多的錯誤http://www.ruby-forum.com/topic/1053934
請幫我,我卡住了這裏
Application Error
org.jruby.rack.RackInitializationException: undefined method `cache_sweeper' for ActionController::Base:Class
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/acts_as_audited-2.0.0.rc6/lib/acts_as_audited.rb:44:in `class_eval'
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/acts_as_audited-2.0.0.rc6/lib/acts_as_audited.rb:44
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/acts_as_audited-2.0.0.rc6/lib/acts_as_audited.rb:68:in `require'
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `require'
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
from /home/dev2/glassfishv3/glassfish/domains/domain1/applications/gavel/WEB-INF/gems/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
... 20 levels...
更新:我已經發現了以下Rails Lighthouse門票,表明清掃車不是線程安全的。您可能會遇到其他問題。但是,有一個解決方法。 https://rails.lighthouseapp.com/projects/8994/tickets/3457-actioncontrollercachingsweeper-controller-instance-is-not-thread-safe – Scott 2011-02-14 13:26:25