I am running into a trouble since last two days. When I run my rails
application into production mode using nginx+passenger, delta indexing
is not working.
When I add any record into my table I found a following error into
error.log of nginx
FATAL: config file '<my application path>/config/
development.sphinx.conf' does not exist or is not readable
Actually it should look for production.sphinx.conf.
And if I search for any record which are indexed at server start time
(rake ts:in RAILS_ENV=production), it shows those records but not
newly added record since above error.
If I run same application into development mode mode using nginx
+passenger or into mongrel using development or production mode it
works perfectly.
Is I missed some thing that I have to in production mode.
Regards,
Rahul P. Chaudhari
I don't suppose you've figured this out since you posted the issue? It's definitely an odd problem - are you certain your Rails app is running using the right environment? Are you explicitly setting the Rails environment in your nginx conf file?
I'm assuming you're using the default delta approach, not delayed job or a datetime column.
--
Pat
> --
>
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>
>
I am using default delta approach and I am sure that my rails
application is running in production mode as it wrote production.log
file.
As I told if I start application and sphinx server in development
mode, all works fine. But If I start same application in production it
won't since when I fire search query it looks for a development port
which specified into sphinx.conf.
If I remove development tag from sphinx.conf then search works fine.
But when I insert any record or update any record it give error as
FATAL: config file '<my application path>/config/
development.sphinx.conf' does not exist or is not readable]
Regards,
Rahul P. Chaudhari
On Dec 26, 8:53 am, Pat Allan <p...@freelancing-gods.com> wrote:
> Hi Rahul
>
> I don't suppose you've figured this out since you posted the issue? It's definitely an odd problem - are you certain your Rails app is running using the right environment? Are you explicitly setting the Rails environment in your nginx conf file?
>
> I'm assuming you're using the default delta approach, not delayed job or a datetime column.
>
> --
> Pat
>
> On 17/12/2009, at 4:37 PM, Rahul Chaudhari wrote:
>
> > Hi All,
>
> > I am running into a trouble since last two days. When I run my rails
> > application intoproductionmodeusing nginx+passenger, delta indexing
> > is not working.
> > When I add any record into my table I found a following error into
> > error.log of nginx
>
> > FATAL: config file '<my application path>/config/
> > development.sphinx.conf' does not exist or is not readable
>
> > Actually it should look forproduction.sphinx.conf.
>
> > And if I search for any record which are indexed at server start time
> > (rake ts:in RAILS_ENV=production), it shows those records but not
> > newly added record since above error.
>
> > If I run same application into developmentmodemodeusing nginx
--
Pat
A simple fix would be (lib/thinking-sphinx/configuration.rb)
def self.environment
Thread.current[:thinking_sphinx_environment] ||= (
defined?(Merb) ? Merb.environment : ENV['RAILS_ENV'] || RAILS_ENV
) || "development"
end
Gaspard
--
Pat