#170 ✓resolved
Quinn

Installation guide

Reported by Quinn | March 1st, 2011 @ 01:00 PM

I followed the 5 minute rails installation guide and it turned into a 8hr plus struggle. I got it working, but I have a few gotchas you may want to add.

1) make sure you have all jetty packages installed (doesn't come by default on Ubuntu 10.10). Not having these will prevent apache from connecting, and the error is ambiguous.

2) This small error i ran into: http://stackoverflow.com/questions/4981297/sunspot-rails-rake-abort...
(if the link doesnt work, its simply replacing the code in sunspot_rails-1.2.0/lib/sunspot/rails/searchable.rb:235 with:

def solr_index(opts={})
  options = {
    :batch_size => 500,
    :batch_commit => true,
    :include => self.sunspot_options[:include],
    :first_id => 0
  }.merge(opts)

  if options[:batch_size]
    counter = 1 #Add the variable
    find_in_batches(:include => options[:include], :batch_size => options[:batch_size]) do |records|
      solr_benchmark options[:batch_size], counter do
        Sunspot.index(records)
      end
      Sunspot.commit if options[:batch_commit]
      counter += 1 # Increase the variable
    end
    Sunspot.commit unless options[:batch_commit]
  else
    Sunspot.index!(all(:include => options[:include]))
  end
end

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Awesome Solr interaction for Ruby

People watching this ticket

Pages