1
當我運行bundle exec rake db:initial_setup
,出現錯誤:未定義的方法'搜索」的寶石:模塊
耙中止!未定義的Gem:Module模塊的搜索器。
我該如何解決這個問題?
這裏是束EXEC耙分貝的輸出: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>'
有什麼建議?
謝謝!
運行'rake'與'--trace'得到一個完整的堆棧跟蹤,然後交回到任何舊版本 檢查versiob這裏的輸出。 – 2013-03-27 03:55:17
這是輸出:rake中止!您已經啓動了rake 10.0.3,但您的Gemfile需要rake 0.9.6。使用bundle exec可以解決這個問題。所以我只使用bundle exec而不使用rake? – 2013-03-28 05:07:22