我让它在开发模式下工作,但当我在生产模式中搞砸它时,它出了问题。我已经干了4个小时了。我卸载了gems、sunspot_rails和sunspot_solr,删除了与它们相关的所有文件,并再次执行了该操作,我仍然得到了相同的错误,我不明白
错误:
RSolr::Error::Http - 404 Not Found Error: NOT_FOUND Request Data: "fq=type%3APost&start=0&rows=10&q=%2A%3A%2A" Backtrace: /home/action/.rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot-2.1.0/lib/sunspot/search/abstract_search.rb:45:in `execute' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/sunspot_rails-2.1.0/lib/sunspot/rails/searchable.rb:344:in `solr_execute_search'提取来源:
def index
@search = Post.search do <======this is highlighted
fulltext params[:search]
paginate :page => params[:page], :per_page => 10
end发布于 2014-03-31 06:23:41
通过添加固定
url: http://localhost:8982/solr/development转到sunspot.yml
https://stackoverflow.com/questions/22754637
复制相似问题