On 31 Jan 2011, at 19:46, "tashfeen.ekram" <[email protected]> wrote:

> So, based on what you are saying, these must be loaded somehow from a
> custom load that I added?
> 
> The thing I find confusing though is that should not the same thing
> happen even if classes are not cached?
> 
class_caching is the thing that triggers whether application classes should be 
automatically loaded. 

> Are there any other files I should look at to track down where this
> include might be coming from?
> 

I'd double check nothing is playing with eager_load_paths (which is those paths 
to be loaded ahead of time)

Fred
> Finally, where is the ideal place to put custom files?
> 
> Thanks for you help. :)
> 
> On Jan 31, 4:26 am, Xavier Noria <[email protected]> wrote:
>> On Mon, Jan 31, 2011 at 3:48 AM, tashfeen.ekram
>> 
>> <[email protected]> wrote:
>>> when i run rake tasks, i run into a strange problem when running it in
>>> production mode. it loads all of the files in the directory app/
>>> runners/cron. when i run the rake task with config.cache_classes set
>>> to true (as it is set in environment/production.rb) then it seems to
>>> load those files in that directory upon execution of the rake command.
>>> however, those files are not loaded when it is set to false.
>> 
>>> i have checked my application, boot, and environment files and i am
>>> not loading that directory.
>> 
>> Can you reproduce it in a minimal application?
>> 
>> I see from the other thread that the application runs Rails 3. Just in
>> case it was migrated from Rails 2 let me comment that in Rails 2
>> custom directories under app are not eager loaded, while they are in
>> Rails 3. In case it rings a bell.
>> 
>> Having said that, eager loading is not triggered for bare rake tasks
>> that do not depend on the builtin :environment task. And for tasks
>> that do depend there's a global flag called $rails_rake_task set to
>> true within :environment that prevents eager loading from being run at
>> all. Thus, as far as rake tasks is concerned, it shouldn't happen *in
>> any case* unless there's some custom behavior somewhere.
> 
> -- 
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to