gpt4 book ai didi

ruby - Gem :Module 的未定义方法 `searcher'

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

当我运行 bundle exec rake db:initial_setup 时,出现错误:

rake aborted! undefined method `searcher' for Gem:Module.

我该如何解决这个问题?

这里是 bundle exec rake db:initial_setup --trace 的输出

rake aborted!
undefined method `searcher' for Gem:Module
/home/jesse/workspace/canvas/lib/tasks/hair_trigger.rake:2:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:171:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:171:in `block in load_with_new_constant_marking'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:547:in `new_constants_in'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.17/lib/active_support/dependencies.rb:171:in `load_with_new_constant_marking'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/tasks/rails.rb:14:in `block in <top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/tasks/rails.rb:14:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.17/lib/tasks/rails.rb:14:in `<top (required)>'
/home/jesse/workspace/canvas/Rakefile:10:in `require'
/home/jesse/workspace/canvas/Rakefile:10:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/rake_module.rb:25:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:604:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:89:in `block in load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:88:in `load_rakefile'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:72:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.6/bin/rake:37:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'

有什么建议吗?

谢谢!

最佳答案

这是因为 Gem.searcher 已被弃用,看来您最近更新了 ruby​​ gems。使用命令检查你的versiob

$ gem -v

你可以使用命令回到任何旧版本

$ rvm rubygems 1.8.24

关于ruby - Gem :Module 的未定义方法 `searcher',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15651371/

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