Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Models not reloading in development in Rails (3.2.11) project

I've searched fairly extensively for any advice and have yet to find it so, here goes:

My Rails project fails to automatically reload models in development. Reloading them currently requires a full server restart.

Previous instances of this issue have been related to non-activerecord files placed in the models directory, though this is not the case for me.

config.cache_classes is properly set to false in my development config file. Views and controllers reload without issue.

All of my rails components are version 3.2.11. I have tried disabling all of my development-specific gems to no avail. This is obviously not a productivity stopper, but it is quite an annoyance. Any help appreciated and I am happy to provide more information if it would help, though I am not using any exotic gems.

Thanks!

like image 820
fredugolon Avatar asked Nov 12 '22 04:11

fredugolon


1 Answers

Some possibilities:

  1. You are not really running on developement environment
  2. You are changing a model within a namespace and didn't told rails to autoload the path
  3. You are changing a file that is included in your class, not your class directly (or any of the many variants for this)
  4. You are caching classes

Considerations:

  1. Things might change according to the webserver you are using
like image 171
fotanus Avatar answered Nov 15 '22 06:11

fotanus