Nilesh Navale
Nilesh Navale

Reputation: 1

Error in Resque

To implement resque in application, I am following the this example. I have done only one change, to not take 'idea' variable value from user input. I have given bydefault value for this variable. This code ruby files are in RAILS_ROOT/lib/ folder. Whenever I run the program with command ruby idea_analyzer.rb, I see

[root@xxxxxx lib]# ruby idea_analyzer.rb
Analyzing your idea: I will learn ruby
Asking for a job to analyze: I
Asking for a job to analyze: will
Asking for a job to analyze: learn
Asking for a job to analyze: ruby

And when I run resque-web command on the console, and see sinatra app screen in the browser, I see job in failed queue with error 'uninitialized constant WordAnalyzer'

I have rake running: rake resque:work QUEUE=*

My redis-server is running. It shows continous logs like
2 clients connected (0 slaves), 471575 bytes in use, 0 shared objects

Can anyone tell me on this error?

Thanks in advance.

Upvotes: 0

Views: 865

Answers (1)

jschorr
jschorr

Reputation: 3054

You might want to read it more carefully:

*If you see an error like no such file to load -- resque, then you need to add require "rubygems" at the top of your program. You should eventually see the error about a missing WordAnalyzer. I’ll take care of that next by creating a word_analyzer.rb file, defining the class…*

Upvotes: 1

Related Questions