Reputation: 3425
Running sunspot:solr:start raises the error
"This command is not supported on i386-mingw32. Use rake sunspot:solr:run to run Solr in the foreground."
Running sunspot:solr:run just hangs. What does run int the "foreground" mean?
Edit
How can one run solr:run and rails s?
Upvotes: 1
Views: 788
Reputation: 9995
Press
'ctrl+shift+t'
to open a new tab in existing opened terminal.
Upvotes: 0
Reputation: 9995
The sunspot:solr:run
runs the process in the console, in your terminal you can see it and you can stop it using ctrl+c
The sunspot:solr:start
runs the process in the background and to stop the process you need to use sunspot:solr:stop
, If you do not stop it explicitly then It will be terminated when you shutdown your machine.
Note: To get the accurate search result according to your current logic and code, use rake sunspot:reindex
command after running the process using sunspot:solr:run
or sunspot:solr:start
Upvotes: 0
Reputation: 7070
RUN
Running in the foreground means that you will see in console the logging whenever a command is called. This is great in a development mode so you can see the system (re)indexing and pulling the queries. Useful for debugging.
START
Start will allow you to run it in the background as a service and is also helpful in production mode where you have the service running without need to be logged in with the console.
When running in production, you will want to do something like this
RAILS_ENV=production rake sunspot:solr:start
Upvotes: 2
Reputation: 2675
The start
one runs it in the background as like a service running on the system, where run
just runs it in the console (foreground) where you ctrl+c it to kill it.
Upvotes: 5