Saturday, February 5, 2011

[Rails] Re: Strange rake error with config.cache_classes

Ahhh. Now, I understand your comment but this also confuses me.

1. rake thinking_sphinx:configure
no prob

2. rake thinking_sphinx:configure RAILS_ENV=production
problem

3. rake db:migrate
no prob

4. rake db:migrate RAILS_ENV=production
no prob

I guess I am confused why the same problem would not surface when
running command 4. Also, I can run command 2 and change in
environments/production.rb cache_classes to false (rather than the
default of true) and then the problem goes away.

It seems like changing cache_classes should not change rake behavior??
Or is there some condition in the rest of the app that is including it
based on whether classes are or not cached?

On Feb 5, 3:17 pm, Xavier Noria <f...@hashref.com> wrote:
> On Sat, Feb 5, 2011 at 8:39 PM,tashfeen.ekram <tashfeen.ek...@gmail.com> wrote:
> > finally figured it out. it is a features of rails 3.0.
>
> >http://edgeguides.rubyonrails.org/configuring.html
>
> > "config.eager_load_paths accepts an array of paths from which Rails
> > will eager load on boot if cache classes is enabled. Defaults to every
> > folder in the app directory of the application. All elements of this
> > array must also be in load_paths."
>
> Yes, I commented it above.
>
> But eager loading does NOT happen on rake tasks no matter the environment.

--
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@googlegroups.com.
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate