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