Skip to content

Instantly share code, notes, and snippets.

@GertThiel
Created September 12, 2010 13:39
Show Gist options
  • Save GertThiel/576114 to your computer and use it in GitHub Desktop.
Save GertThiel/576114 to your computer and use it in GitHub Desktop.
gem 'rsolr-direct', '~> 0.1.0', :require => nil
if RUBY_PLATFORM =~ /java/
require 'rsolr-direct'
::RSolr.load_java_libs
::Sunspot.session.instance_variable_set(:@connection,
::RSolr.connect(
:direct,
:solr_home => File.join(RAILS_ROOT, 'solr'),
:data_dir => File.join(RAILS_ROOT, 'solr', 'data', RAILS_ENV)
)
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment