gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 18:20:57 24 4
gpt4 key购买 nike

我正在尝试使用 acts_as_paranoid gem,它已经添加到 Gemfile 中(gem 'acts_as_paranoid')捆绑更新并安装正在安装 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

最佳答案

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

看起来像Paranoia是当前的替代者。

关于ruby-on-rails - ruby-1.9.3-p448/gems/acts_as_paranoid-0.3.1/lib/acts_as_paranoid.rb :42:in `alias_method' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18489525/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com