Reputation: 131
When I am running bundle exec rake db:initial_setup
, an error occurs:
rake aborted! undefined method `searcher' for Gem:Module.
How can I fix this?
And here is the output of 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>'
Any advice?
Thanks!
Upvotes: 1
Views: 754
Reputation: 2268
This is because Gem.searcher became deprecated, it seems you updated ruby gems recently. check your versiob using the command
$ gem -v
you can get back to any old version using the command
$ rvm rubygems 1.8.24
Upvotes: 3