On 6 May 2011, at 15:35, MEDARKNESS
<medarkness-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 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
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
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.