A little more clarification -- yes, running under passenger is different
than running via script/console.  Passenger processes are spawned by, and
get their environment from apache, so depending on your configuration, ENV
can be quite different than your ENV when running interactively.
What I was experiencing was that the Sphinx binaries were installed in
/usr/local/bin, which was part of my PATH, so everything worked correctly
from the shell, including delta updates in script/console.  My cron-based
full re-index processes had the necessary PATH, so they worked fine, but
delta updates were not working for records updated via the web.  I added
some debug logging inside the method that was trying to execute indexer and
found that Passenger's PATH did not include /usr/local/bin.
To solve it, one can either symlink the binary to somewhere in Passenger's
PATH, or update ENV['PATH'] to include the necessary path.

Hope this helps,

Solomon

On Thu, Feb 5, 2009 at 8:09 AM, Pat Allan <[email protected]> wrote:

>
> Hi Steven
>
> In many cases, the PATH is already correct for referring to the Sphinx
> binaries.
>
> However, if you don't think delta indexing is working, a way to check
> is creating a model instance within script/console, and then you
> should see something like:
>
> >> Post.create(:text => "barboo")
> Sphinx 0.9.8-release (r1371)
> Copyright (c) 2001-2008, Andrew Aksyonoff
>
> using config file '/Users/ryanbigg/Sites/rboard/config/
> production.sphinx.conf'...
> indexing index 'post_delta'...
> collected 1 docs, 0.0 MB
> collected 0 attr values
> sorted 0.0 Mvalues, nan% done
> total 1 docs, 0 bytes
> total 0.024 sec, 0.00 bytes/sec, 41.23 docs/sec
> rotating indices: succesfully sent SIGHUP to searchd (pid=19356).
>
>
> If you're not seeing that, then Ruby isn't finding the Sphinx
> binaries, and that's when you need to set the bin_path. First thing
> you need to do, is on the relevant machine, run 'which searchd', and
> that should give you a path (eg: /usr/local/bin/searchd) - and then,
> in config/sphinx.yml, you need to set the bin path for that environment:
>
> production:
>   bin_path: "/usr/local/bin/"
>
> Now, I'm not sure if running via passenger is different to running via
> script/console - so if things are working within the latter, but not
> the former, you still might need to set the path as above.
>
> Cheers
>
> --
> Pat
>
> On 05/02/2009, at 9:44 PM, Steven Bristol wrote:
>
> >
> > Can someone please clarify this? What path has to be set? Where can I
> > see that output to confirm that the delta is being used?
> >
> > cheers,
> > steven bristol
> > >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to