Question

Running : rake sunspot:reindex --trace

Returned: Don't know how to build task sunspot:reindex.

Tried running rake sunspot:solr:start --trace and got the following output:

** Invoke sunspot:solr:start (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute sunspot:solr:start

Sunspot 2.0.0 | Solr 1.0.9 | rails 2.3.5 | MacOS X

Was it helpful?

Solution

I imagine whats going on here is the gem did not properly reinstall. Also it when working with old apps, you need to make sure that you update your system gems to the right version.

Start from scratch and do the following :

rvm gemset delete your_gemset
cd .
gem update --system 0.0.0 # Whatever version you know worked with the app you are using.
rake gems:install

rake gems:install is very flaky and is essentially why it was replaced with Bundler. Assuming your gems did not install all the way, try to manually install what didn't work :

gem install sunspot_solr

Then finally try the command :

rake sunspot:solr:start

You should have an active PID start that you can reveal by typing :

ps aux | grep solr

OTHER TIPS

If you are running sunspot in a windows environement, then rake sunspot:solr:start will not work.

First you have to change in your C:\Ruby187\lib\ruby\gems\1.8\gems\sunspot-1.2.1\lib\sunspot\server.rb

comment the line

exec(Escape.shell_command(command))

and add the following line

exec(Escape.shell_command(command).gsub("'",'"'))

Then try using rake sunspot:solr:run

This is applicable only for your windows environment

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top