require 'rsolr'
require 'sunspot/rails'

require 'sunspot-rails-http-basic-auth/rsolr/connection/net_http'
require 'sunspot-rails-http-basic-auth/sunspot/rails'
require 'sunspot-rails-http-basic-auth/sunspot/rails/configuration'
require 'rsolr'
require 'sunspot/rails'

require 'sunspot-rails-http-basic-auth/rsolr/connection/net_http'
require 'sunspot-rails-http-basic-auth/sunspot/rails'
require 'sunspot-rails-http-basic-auth/sunspot/rails/configuration'


if Rails::VERSION::MAJOR == 2
  # reload the session that was already initialized when sunspot-rails gem loaded
  Sunspot.session = Sunspot::Rails.build_session
end

Patch to make this gem work with Rails 2 - the order it loads gems is different in Rails 2 and Rails 3 since we don't have Railties and the initializer block in Rails2
Patch to make this gem work with Rails 2 - the order it loads gems is different in Rails 2 and Rails 3 since we don't have Railties and the initializer block in Rails2