Running Rails 4.0.1 and Sunspot 2.1.0, I can start sunspot in development, but when I try to execute a query or index, I get the following error:
RSolr::Error::Http (RSolr::Error::Http - 404 Not Found
Error: Not Found
Request Data: "fq=type%3AMatch&q=arsenal&defType=edismax&start=0&rows=10"
Backtrace: /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/activesupport-4.0.1/lib/active_support/notifications.rb:159:in `block in instrument'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/activesupport-4.0.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/activesupport-4.0.1/lib/active_support/notifications.rb:159:in `instrument'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot_rails-2.1.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot-2.1.0/lib/sunspot/search/abstract_search.rb:45:in `execute'
/Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/sunspot-2.1.0/lib/sunspot/session.rb:59:in `search'):
app/models/match.rb:483:in `upcoming_games'
app/controllers/tickets_controller.rb:34:in `search'
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.6ms)
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.8ms)
Rendered /Users/bashar/.rvm/gems/ruby-2.1.1@global/gems/actionpack-4.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (13.1ms)
This is my sunspot.yml
production:
solr:
hostname: ENV['WEBSOLR_URL']
port: 80
log_level: WARNING
path: /solr/production
development:
solr:
hostname: localhost
port: 8982
log_level: INFO
path: /solr/development
test:
solr:
hostname: localhost
port: 8981
log_level: WARNING
path: /solr/test
NOTE . I tried configuring solr_home, trying to delete the solr folder and restart the sunspot as suggested elsewhere, and also make sure pid Rails is trying to connect to the same one.
I know there are other similar messages, but no one has provided a solution that worked for me. Any idea?
For what it's worth, I'm using Mongoid. But that hardly seems to be related.