1

I am trying to run sunspot on the development port (8982). I run the following command $ RAILS_ENV=development rake sunspot:solr:start

Sunspot starts but it does not start on the development port, it starts on port 8983, which is the production port. I am not using config/sunspot.yml. I have a config/initializers/sunspot.rb file which reads as follows

require File.join(Rails.root, 'lib', 'sunspot', 'rails', 'adapters')
Sunspot::Adapters::InstanceAdapter.register(Sunspot::Rails::Adapters::ActiveRecordInstanceAdapter, ActiveRecord::Base)
Sunspot::Adapters::DataAccessor.register(Sunspot::Rails::Adapters::ActiveRecordDataAccessor, ActiveRecord::Base)

module Sunspot
  HIGHLIGHTS = {
    :elements => ['span'], :attributes => { 'span' => ['class'] }
  }

Additionally in config/environments/development.rb I have a line that reads

Sunspot.config.solr.url = 'http://localhost:8982/solr'

I am not sure what I am doing wrong. I need to start sunspot on Port 8982 ( the development node).

Any help would be appreciated

  • I believe I'm having a similar problem, which I detailed here: http://stackoverflow.com/questions/11565149/connection-refused-using-sunspot-and-solr-in-rails – aardvarkk Jul 19 '12 at 17:20
  • Does it work using a YAML configuration file? – Adrien Jul 20 '12 at 09:35

1 Answers1

1

See https://github.com/sunspot/sunspot/issues/262 to track the resolution of the bug.

Adrien
  • 2,088
  • 1
  • 18
  • 35