【问题标题】:rake aborted! Don't know how to build task 'mongoid_search:index'耙中止!不知道如何构建任务 'mongoid_search:index'
【发布时间】:2013-10-17 06:45:12
【问题描述】:

您好,我正在尝试执行 rake mongoid_search:index,但它给了我这个错误。

rake aborted!
Don't know how to build task 'mongoid_search:index'
/home/user/.rvm/gems/ruby-1.9.3-p448@app/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-1.9.3-p448@app/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

【问题讨论】:

    标签: search ruby-on-rails-3.2 mongoid


    【解决方案1】:

    经过细化搜索,我能够找出我的错误。

    在我的 gemset 中,我有两个版本的 mongoid(2.x,3.x)。所以,我删除了旧版本并添加了

    我的 lib/tasks 文件夹中的Mongoid Rake 文件解决了我的问题。

    【讨论】:

    • 上面的链接现在不存在了。
    【解决方案2】:

    我通过将 master 添加到 gem 来修复错误,引用自 https://github.com/mauriciozaffari/mongoid_search/issues/67

    gem 'mongoid_search',github:'mauriciozaffari/mongoid_search',分支:'master'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-11
      • 1970-01-01
      • 2012-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多