总是得到 “RSolr ::错误:: HTTP - 404未找到” 上Circleci.com

问题描述:

我on Rails的4,这里是我的config/sunspot.yml -总是得到 “RSolr ::错误:: HTTP - 404未找到” 上Circleci.com

test: 
    solr: 
    hostname: localhost 
    port: 8981 
    log_level: WARNING 
    path: /solr/test 
    pid_dir: <%= File.join(::Rails.root, 'tmp', 'pids')%> 

    auto_index_callback: after_commit 
    auto_remove_callback: after_commit 

在circleci.com我总是得到错误因为solr,所以几乎没有任何测试通过:

RSolr::Error::Http: 
RSolr::Error::Http - 404 Not Found 
Error: Not Found 

    URI: http://localhost:8981/solr/test/update?wt=ruby 

如何解决?

不要ü有Solr的文件夹一些sorl.xml文件,如果是的u能复制它,还因为它是一个测试环境u需要在你的命令添加RAILS_ENV =测试Solr的开始,如果它是太阳黑子的Solr