Martin Martin - 1 year ago 263
Ruby Question

What is Config.Eager_load and how do I fix it?

I've been trying to run a

rails db migrate
command, and its worked on many apps with the same setup as this one, but for whatever reason I am getting the following error:

config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
* development - set it to false
* test - set it to false (unless you use a tool that preloads your test environment)
* production - set it to true


But here's the thing. All of those are set correctly. I've even tried setting them incorrectly running it, and setting them correct again. I've restarted my computer, my app. Everything. I can't find a good explanation of what
config.eagar_load
even really is either. What is this thing? Why is it messing up my app? How do I even troubleshoot it?

Answer in part: I was using
rails db migrate
and should have been using
rails db:migrate
so that fixed the problem, but I would still like to know what config.eager_load is, and what it does.

Answer Source

I recommend you this great post.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download