Job failed to load: uninitialized constant ThinkingSphinx::Deltas::DeltaJob.

275 views
Skip to first unread message

Francois Lamontagne

unread,
Dec 1, 2009, 10:06:00 AM12/1/09
to thinkin...@googlegroups.com
Hello,

I'm getting the error "Job failed to load: uninitialized constant ThinkingSphinx::Deltas::DeltaJob. Try to manually require the required file." each time delayed_job tries to deserialize a job. Do you have any idea?

I'm using:

thinking sphinx (gem) : 1.3.8
ts-delayed-delta (gem) : 1.0.1
delayed_job (gem) : 1.8.4

Pat Allan

unread,
Dec 1, 2009, 7:19:04 PM12/1/09
to thinkin...@googlegroups.com
Hi Francis

What does your gem list look like in environment.rb?

--
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
> .

Pat Allan

unread,
Dec 1, 2009, 7:24:06 PM12/1/09
to thinkin...@googlegroups.com
Sorry for mispelling your name Francois :|

--
Pat

On 02/12/2009, at 11:19 AM, Pat Allan wrote:

> Hi Francis
>
> What does your gem list look like in environment.rb?
>
> --
> Pat
>
> On 02/12/2009, at 2:06 AM, Francois Lamontagne wrote:
>
>> Hello,
>>
>> I'm getting the error "Job failed to load: uninitialized constant
>> ThinkingSphinx::Deltas::DeltaJob. Try to manually require the
>> required file." each time delayed_job tries to deserialize a job. Do
>> you have any idea?
>>
>> I'm using:
>>
>> thinking sphinx (gem) : 1.3.8
>> ts-delayed-delta (gem) : 1.0.1
>> delayed_job (gem) : 1.8.4
>>
>> --
>>
>> You received this message because you are subscribed to the Google
>> Groups "Thinking Sphinx" group.
>> To post to this group, send email to thinking-
>> sph...@googlegroups.com.

Pat Allan

unread,
Dec 1, 2009, 7:48:59 PM12/1/09
to thinkin...@googlegroups.com
And on that note, I was able to reproduce your problem - ts-delayed-
delta 1.0.2 should fix it. Let me know if I'm mistaken :)

--
Pat

Francois Lamontagne

unread,
Dec 2, 2009, 8:28:11 AM12/2/09
to thinkin...@googlegroups.com
Hello Pat,

Thanks for your help! Everything is fine now. My problem was due to a bug in one of my "define_index" block. I think it is interesting to note what happened :

define_index do
    indexes :title    
    set_property :enable_star => 1
    set_property :min_prefix_len => 3
    set_property :delta => :delayed
   
    has :published, :title
  end 

For some reasons I had put the column "title" (string) in my attribute list. Running rake ts:rebuild wouldn't produce any error, but now everytime delayed_job would try to process a job, the rake task would crash with the following error :

"rake aborted!

Job failed to load: uninitialized constant ThinkingSphinx::Deltas::DeltaJob. Try to manually require the required file."

Removing :title from the "has" method and running rake ts:conf then rake ts:rebuild fixed it so I'm happy now.

Thanks again for your help!

François

Brian Percival

unread,
Dec 4, 2009, 4:11:19 AM12/4/09
to Thinking Sphinx
Have a similar problem with this environment, in which I plan to use
delayed deltas:

thinking sphinx 1.3.8
ts-delayed-delta 1.0.2

When I try running rake ts:rebuild or rake ts:dd, I'm getting
unintialized constant on ThinkingSphinx::Deltas::Job referenced in
tasks.rb in the ts-delayed-delta gem

I finally tracked down the class...it's in lib/thinking_sphinx/deltas/
***delayed_delta***/job.rb, which is a directory structure that
doesn't match the module namespace of the class (note the directory
enclosed by asterisks). Not sure if that's intentional, but it
surprised me. I wasn't sure if it was on purpose, or if not, which is
"right"...the directory structure or the classname, so didn't really
have a patch to submit.

But in the short term to get things running, I've added a require
'thinking_sphinx/deltas/delayed_delta/job' to my Rakefile and things
seem to be happy.

Please let me know if I'm doing something bad here.

Matt

unread,
Dec 13, 2009, 10:50:07 AM12/13/09
to Thinking Sphinx
I was getting the same error. Turns out I still had an old version of
the gem installed, named freelancing-gods-thinking-sphinx.
Uninstalling all versions of that gem, and updating to the latest
thinking-sphinx did the trick.

sumeet panchal

unread,
Dec 23, 2009, 4:29:41 PM12/23/09
to Thinking Sphinx
Hi,

I am having same problem I am trying to do rake ts:rebuild but throws
this:

uninitialized constant ThinkingSphinx::Deltas::Job

I have installed gem

delayed_job (1.8.4)
ts-delayed-delta (1.0.2)
ts-delayed-delta (1.0.2)

I tried to update version of my thinking sphinx gem but it do not
update by doing sudo gem update.
Also this is the error on my web page:

Connection to 127.0.0.1 on 9312 failed. Connection refused - connect
(2)

Please help.
Thanks

Pat Allan

unread,
Dec 23, 2009, 5:05:07 PM12/23/09
to thinkin...@googlegroups.com
Hi Sumeet

What version of TS do you have installed? And do you have the old
github gem (freelancing-god-thinking-sphinx) installed? That can cause
conflicts like this.

--
Pat

sumeet panchal

unread,
Dec 23, 2009, 5:14:15 PM12/23/09
to Thinking Sphinx
Hi,

Do you mean version of thinking sphinx gem:
it is
thinking-sphinx (1.3.14)

I am trying to update it but its not getting updated.

this is what my environment.rb looks like

config.gem 'thinking-sphinx', :lib => 'thinking_sphinx',
:source => 'http://gemcutter.org/'

Thanks

On Dec 13, 8:50 am, Matt <madcow...@gmail.com> wrote:

sumeet panchal

unread,
Dec 23, 2009, 5:33:05 PM12/23/09
to Thinking Sphinx
Hi Pat,

I was having freelancing gem that was conflicting.
Thanks for you help, it worked.

Thanks
Sumeet

Fabien JAKIMOWICZ

unread,
Jan 20, 2010, 5:46:56 PM1/20/10
to Thinking Sphinx

I was facing the same issue, despite the fact that I had only the
latest gems installed.

Turned out it was a the require ordre in my Rakefile that was wrong,
you must include thinking-sphinx rake tasks before any other one :

require 'thinking_sphinx/tasks'
require 'thinking_sphinx/deltas/delayed_delta/tasks'

Reply all
Reply to author
Forward
0 new messages