0

I'm new to ruby on rails, and I am toying around with the Sunspot_Rails Gem.

My gemfile looks like this

gem "sunspot_rails"

group :development do
   gem 'sqlite3', '1.3.8'
   gem 'better_errors'
   gem 'binding_of_caller'
   gem 'sunspot_solr'
end 

I followed the instructions on github for quick start. I start solr with

bundle exec rake sunspot:solr:start

Then I start my rails server.

rails s

The pages load, but when I try to add an instance of a class through localhost, I get an error

RSolr::Error::Http at /dogs 
RSolr::Error::Http - 500 Internal Server Error
Error: {'responseHeader'=>{'status'=>500,'QTime'=>3},'error'=>{'msg'=>'no segments* file        found in NRTCachingDirectory(org.apache.lucene.store.NIOFSDirectory@/Users/ShiftedRec/whosthedee/solr/development/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@170ad173; maxCacheMB=48.0 maxMergeSizeMB=4.0): files: [write.lock]','trace'=>'org.apache.lucene.index.IndexNotFoundException: no segments* file found in 

The only thing i've seen that on the internet that relates to this is

http://www.garysieling.com/blog/fixing-solr-error-no-segments-file-found-in-nrtcachingdirectory

What the heck am I doing wrong?

Thanks...

Peege151
  • 1,562
  • 2
  • 21
  • 45

1 Answers1

0

If you get this error - just clean and fresh install..fixed fo rme

Peege151
  • 1,562
  • 2
  • 21
  • 45
  • What exactly do you mean? You uninstalled & reinstalled the sunspot gem? That didn't work for me – steve Jul 11 '14 at 20:14
  • delete the tmp folders too - fresh install didn't do it? restart server? – Peege151 Jul 11 '14 at 21:30
  • Nothing worked for me. I have to run the server manually :( `RAILS_ENV=test bundle exec sunspot-solr run -p 8981 -d solr/data/test` – steve Oct 31 '14 at 21:47