我有多个问题让locomotivecms search运行。
第一个问题是,在我添加了火车头搜索gem并使用安装了gem的bundler运行安装之后,我没有看到后台发生任何变化。我看不到任何使页面可搜索的选项。
第二个问题与我用来开发的旅行车有关。我尝试安装gem locomotivecms search-wagon,但没有成功。
这就是我所做的更详细的事情。
我已经将locomotive_search gem添加到引擎中,并运行包安装,没有出现任何问题。
gem 'locomotivecms-search', '>= 0.3.5', require: 'locomotive/search/mongoid'
bundle install根据文档网站(http://doc.locomotivecms.com/guides/search)上的说明,我尝试为旅行车添加一个gem,但是没有找到。
gem 'locomotivecms-search-wagon', '~> 0.3.5'
bundle install捆绑程序返回以下输出:
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'locomotivecms-search-wagon (~> 0.3.5) ruby' in the gems available on this machine.所以,我继续了下去。我添加了搜索表单,提交后将向/?t=SEARCH_TERM发送请求
我通过运行rake db:mongoid:create_indexes创建了索引
然后,我创建了一个搜索页面,并使其内容类似于此页面底部的代码:http://doc.locomotivecms.com/guides/search
当我尝试通过捆绑包执行旅行车推送生产-r页面推送页面时,我得到了以下错误:
creating search{"template"=>["Liquid Syntax error ('Unknown tag 'search_for'' on '')"], "raw_template"=>["Liquid Syntax error ('Unknown tag 'search_for'' on '')"]}我假设这是因为我不能安装locomotivecms search- would gem,然而,我不知道如何继续,所以我将感谢所有人的帮助。
发布于 2015-03-23 16:43:54
我也遇到过类似的问题。尝试设置:
setParameter=textSearchEnabled=true->在mongodb.conf文件中手动。
https://stackoverflow.com/questions/27517416
复制相似问题