ruby-1.9.3-p448 / gems / acts_as_paranoid-0.3.1 / lib / acts_as_paranoid.rb:42:in"alias_method'

时间:2013-08-28 13:37:01

标签: ruby-on-rails ruby acts-as-paranoid

我正在尝试使用acts_as_paranoid gem,已经在Gemfile中添加了(gem'meject_as_paranoid')更新并安装了bundle安装acts_as_paranoid(0.3.1) 但是,当我启动我的服务器时,我有以下错误,任何想法?非常感谢你!

/Users/jcr/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/jcr/web/sss/bin/rails server -b 0.0.0.0 -p 3000 -e development

/Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_paranoid-0.3.1/lib/acts_as_paranoid.rb:42:in `alias_method': undefined method `validate_find_options' for class `Class' (NameError)
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_paranoid-0.3.1/lib/acts_as_paranoid.rb:42:in `singletonclass'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_paranoid-0.3.1/lib/acts_as_paranoid.rb:41:in `included'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_paranoid-0.3.1/lib/acts_as_paranoid.rb:166:in `include'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/acts_as_paranoid-0.3.1/lib/acts_as_paranoid.rb:166:in `<top (required)>'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /Users/jcr/web/sss/config/application.rb:7:in `<top (required)>'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
    from /Users/jcr/.rvm/gems/ruby-1.9.3-p448/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
    from /Users/jcr/web/sss/bin/rails:4:in `require'
    from /Users/jcr/web/sss/bin/rails:4:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

1 个答案:

答案 0 :(得分:3)

那个gem看起来已经死了,我认为在Rails 4中删除了validate_find_options方法。

看起来Paranoia是目前的替代品。