RAKE class scope

Hi everyone, i’m having a little trouble understanding how rails
(rake) loads the different files and gems and environnement? for
example i’m trying to run a resque worker :
QUEUE=testqueue resque:work
and the problem is that when i do that the worker doesn’t find the
Classes that it should run
i get :
NameError: uninitialized constant TestClass
i know that’s a require problem, but i need to know why rake doesn’t
take the class knowing that it’s located in the lib/testclass.rb in
rails project?
any clues ?
thanks

On 6 May 2011, at 15:35, MEDARKNESS [email protected] wrote:

rails project?
any clues ?
thanks

Is lib in ruby’s load path? (I can’t remember what the environment looks
like by default. If you make your task depend on :environment then
things should behave as they do normally in your app, although obviously
loading the whole rails environment might be more than you need.

Fred